Deploying Django at Dreamhost
Asked Answered
P

5

6

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

Palinode answered 9/1, 2009 at 8:15 Comment(0)
S
5

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.

Seersucker answered 9/1, 2009 at 8:40 Comment(0)
R
2

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

Richly answered 30/8, 2010 at 18:47 Comment(0)
N
1

This is the official Dreamhost wiki. I don't know what the script, you mention, is doing, but you have to setup rewrite rules in .htaccess to run your fcgi scripts.

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

If Django is crucial to your site, you may wish to consider another host since Dreamhost does not officially support Django. In the past, some users have reported reliablity problems; however, others have had no problems.

Negative answered 9/1, 2009 at 8:33 Comment(5)
Please check the link in question. It describes what it does (I got it from Dreamhost wiki). As for no official support, I'm not really concerned if I can get it working.Palinode
Just because they don't officially support it doesn't mean you should consider looking elsewhere.Notornis
Sure. Just because some users reported reliability problems is a more important reason to look elsewhere. That phrase seems to be removed from the wiki now, BTW. This is the old version: wiki.dreamhost.com/index.php?title=Django&oldid=24848Negative
Nothing is supported on a VPS - you do it all yourself. I think Dreamhost means is that they won't give you free help, and if they change their underlying systems in a way that causes you grief they don't want to get used. I'm guessing they got a lot of tech suport questions from people who needed help setting it up, and decided not to help. They do maintain the OS, database, and Apache though.Apparel
@Apparel I was talking about their shared hosting (two years ago), I don't remember a VPS offer back then.Negative
C
1

I've been through it with dreamhost, and I decided it was simply too much trouble to set up Django.

But it is much more easier to setup Django on any VPS host than on shared hosting.

I've had good luck with webfaction. They're not a VPS but they still give you a lot of control over your site (like you can set up your own Apache instance if you want).

Clarsach answered 9/1, 2009 at 13:25 Comment(1)
Thanks for the suggestion. I'll definitely consider webfaction if I have to switch from Dreamhost. They seem quite affordable for a quality Django host.Palinode
A
1

Passenger is the way to go. I wrote a little HOWTO on building a modern (2.6.5) Python and configuring Django, etc. with Passenger, it may be helpful if you already have a project.

Antiseptic answered 10/4, 2010 at 15:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.