Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploying Django at Dreamhost

I'm trying to get the Poll tutorial working at my Dreamhost account (I don't have any prior experience of deploying Django). I downloaded the script I found here (http://gabrielfalcao.com/2008/12/02/hosting-and-deploying-django-apps-on-dreamhost/) at my home directory and executed it. Now I have Python 2.5 and Django in ~/.myroot/ and my Django projects directory is ~/projects/

Here's the content of ~/projects/ directory (I copied the polls/ and and templates/polls/ directories myself).

projects/
|-- admin_media -> /home/imran2140/.myroot/usr/lib/python2.5/site-packages/django/contrib/admin/media
|-- dispatch.fcgi
|-- polls
|   |-- __init__.py
|   |-- __init__.pyc
|   |-- admin.py
|   |-- admin.pyc
|   |-- models.py
|   |-- models.pyc
|   |-- polls.db
|   |-- urls.py
|   |-- urls.pyc
|   |-- views.py
|   `-- views.pyc
|-- script_templates
|   |-- dispatch.template
|   `-- htaccess.template
`-- templates
    `-- polls
        |-- detail.html
        |-- index.html
        `-- results.html

5 directories, 17 files

Now what should I do to get the Polls app working?

Update

I finally got a "Hello World" Django app working with Passanger WSGI. It worked fine with both Server's default Python 2.3.5 and my installed Python 2.5.2.

Passanger WSGI - Django at Dreamhost Wiki

like image 438
Imran Avatar asked Jan 09 '09 08:01

Imran


2 Answers

Since DreamHost supports mod_passenger, and AFAIK it works not only for Ruby/Rails apps but also for Python/Django - you might give it a try.

Just put app there and select directory where execute script are (eg. dispatch.fcgi). You might wanna see/study a working example at GitHub.

like image 162
Marcin Gil Avatar answered Sep 29 '22 02:09

Marcin Gil


There is now a script that you can run that does most of the set up for you. It is mentioned on the main page about Django on the Dreamhost wiki here: http://wiki.dreamhost.com/Django

like image 25
Christophe Sautot Avatar answered Sep 29 '22 01:09

Christophe Sautot