I was ableÂ to set up the Django sample site on my Dreamhost site. Django is a high-level Python Web framework that facilitates rapid web application development. I was able to follow the Django tutorial and instruction from Dreamhost to add a Django site to my domain.
First I setup my local environment (Python 3.4 and Django 1.6.5) and created a polls app by following the wonderful Django tutorials.
After testing the polls app locally using the development server, I was ready to put the simple app online.
Then I set up the remote environment on my ShallWeLearn domain by following this instruction
My directory looks as followed:
$HOME// env/ mysite/ passenger_wgi.py public static
And my passenger_wgit.py file looks as followed:
import sys, os cwd = os.getcwd() sys.path.append(cwd) sys.path.append(cwd + '/mysite') sys.path.insert(0,cwd+'/env/bin') sys.path.insert(0,cwd+'/env/lib/python3.4/site-packages/django') sys.path.insert(0,cwd+'/env/lib/python3.4/site-packages') os.environ['DJANGO_SETTINGS_MODULE'] = "mysite.settings" import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler()
The imagine below shows the admin page of Polls App: