I started playing around with Django and Pinax for a little pet project, which I might publish in a couple of months… So far the experience has not been good, but the alternatives are worse. Besides Django I also considered Ruby on Rails, but Django seems to be a bit stricter in programming standards. Documentation for both is not really good, most of it is pretty old and written for developers who already have a lot of knowledge on Django or Ruby. There are thousands or packages for both which would do what I need, but they come without any documentation. So the basic “Don’t repeat yourself” paradigm of both is maybe working, but you would need to repeat the work done by others as their work is not understandable and undocumented. Hurray…
What worked so far:
- Follow the Pinax Tutorial to set up everything. Worked so far, except that you need to fix one line in setup_project.py if you have a recent version of pip
What did not work:
- Setup Apache with wsgi, configure everything in vhost.conf in /var/www/vhosts//conf as plesk manages that stuff somehow. After fiddling with vhost.conf, run /usr/local/psa/admin/sbin/websrvmng –reconfigure-vhost –vhost-name=mysite.net
WSGIDaemonProcess mysite.net python-path=/var/www/vhosts/mysite.net/httpdocs/mysite-pinax/lib/python2.6/site-packages
WSGIScriptAlias / /var/www/vhosts/mysite.net/httpdocs/mysite-pinax/mysite-pinax/wsgi.py
Alias /site_media/ /var/www/vhosts/mysite.net/httpdocs/mysite-pinax/mysite-pinax/site_media
Allow from all
- Configure wsgi.py:
ALLDIRS = ['/var/www/vhosts/mysite.net/httpdocs/mysite-pinax/lib/python2.6/site-packages']
# Remember original sys.path.
prev_sys_path = list(sys.path)
# Add each new site-packages directory.
for directory in ALLDIRS:
# Reorder sys.path so new directories at the front.
new_sys_path = 
for item in list(sys.path):
if item not in prev_sys_path:
sys.path[:0] = new_sys_path
from django.core.handlers.wsgi import WSGIHandler
# setup the environment for Django and Pinax
# set application for WSGI processing
application = WSGIHandler()