Last week, I signed up an account with Webfaction, for my latest Django (sounds like Jungle) adventure. So far, it’s one of the few web hosting companies out there that offer support for Django framework and they did a superb job at it. I love them.
A few days back, I wrote my first Django app, Tweeeter, after following a few tutorials. With the app, I think it will be great to get it deployed to have a full experience from programming to deployment. So I followed the tutorial from Webfaction’s knowledgebase.
However, I felt the approach has messed up the normal structure that I usually used, which is having apps folder and includes folder in the django project folder. The tutorial shows how to server static files by creating Webfaction’s app. So if you have 10 static folders, you will have to create 10 Webfaction’s app, which I can’t understand why I must do it. So, after hours of trying, with the help of Webfaction’s support, it finally works the way I wanted.
So how do I setup my own django app in Webfaction?
I followed exactly what the tutorial said except the part of setting up the static files. Instead of creating multiple apps, I just add the following to the apache/httpd.conf in the djangoproject.
Alias /includes/ /home/username/webapps/webfactionapp/djangoproject/includes/ SetHandler None
Alias /media/ /home/username/webapps/webfactionapp/lib/python2.5/django/contrib/admin/media/ SetHandler None
I hope it’s clear enough. If there is any questions, feel free leave it in the comments.
Best Wordpress Hosting Providers - 2014
All three hosts offer FREE 1-click Wordpress installs making them the best Wordpress hosting providers. For more web hosting reviews be sure to check out AlreadyHosting.com.
4 Responses to “Sexy way of setting Django in Webfaction”
Leave a Reply
You must be logged in to post a comment.