Deploy Django in Dreamhost

I am trying to get a survey tutorial that runs on my Dreamhost account (I have no experience using Django). I downloaded the script that I found here ( http://gabrielfalcao.com/2008/12/02/hosting-and-deploying-django-apps-on-dreamhost/ ) in my home directory and executed it. Now I have Python 2.5 and Django in ~ / .myroot /, and my Django project directory is ~ / projects /

Here is the contents of the ~ / projects / directory (I myself copied the polls / and the templates / polls / directories).

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 do I need to do to get the polls app to work?

Update

I finally got Django's "Hello World" application working with WSGI Passanger. It worked great with both Python 2.3.5 by default and Python 2.5.2 installed.

Passanger WSGI - Django on the Dreamhost Wiki

+6
django wsgi deployment dreamhost fastcgi
source share
5 answers

Since DreamHost supports mod_passenger, and AFAIK works not only for Ruby / Rails applications, but also for Python / Django - you can try it.

Just install the application and select the directory where the script is executed (e.g. dispatch.fcgi). You can watch / learn a working example on GitHub.

+5
source share

Now there is a script that you can run that does most of the settings for you. The Django homepage on the Dreamhost wiki says: http://wiki.dreamhost.com/Django

+2
source share

This is the official Dreamhost wiki . I don’t know what the script does, as you mentioned, but you need to configure rewrite rules in .htaccess to run fcgi scripts.

But it is much easier to configure Django on any VPS host than on shared hosting. Consider also their disclaimer:

If Django is critical to your site, you might think of a different host, as Dreamhost does not officially support Django . In the past, some users have reported reliability issues; however, there were no other problems.

+1
source share

I went through this with dreamhost, and I decided it was just too complicated to configure Django.

But it’s much easier to configure Django on any VPS host than on shared hosting.

I got lucky with webfaction . They are not VPS, but they still give you a lot of control over your site (for example, you can configure your own instance of Apache if you want).

+1
source share

Passenger is the way to go. I wrote a small HOWTO to create modern (2.6.5) Python and configure Django, etc. Using Passenger can be useful if you already have a project.

+1
source share

All Articles