#!/home/{{ user }}/{{ root_domain }}/env/{{ project_name }}/bin/python
import site
site.addsitedir('/home/{{ user }}/{{ root_domain }}/env/{{ project_name }}/lib/python2.6/site-packages')

import sys, os

os.environ['PATH'] = '/home/{{ user }}/{{ root_domain }}/env/{{ project_name }}/bin:%s' % os.environ.get('PATH', '/bin:/usr/bin')
os.environ['VIRTUAL_ENV'] = '/home/{{ user }}/{{ root_domain }}/env/{{ project_name }}' 
os.environ['PYTHON_EGG_CACHE'] = '/home/{{ user }}/{{ root_domain }}/env/{{ project_name }}/egg_cache'

# Add the project to the sys.path
sys.path.insert(0, "/home/{{ user }}/{{ root_domain }}/env/{{ project_name }}/project")

activate_this = '/home/{{ user }}/{{ root_domain }}/env/{{ project_name }}/bin/activate_this.py'
execfile(activate_this, dict(__file__=activate_this))

# Uncomment to switch to the directory of your project (optional).
# os.chdir("{{ project_env }}/project")

# Set the DJANGO_SETTINGS_MODULE environment variable.
os.environ['DJANGO_SETTINGS_MODULE'] = "{{ project_name }}.sitesettings.{{ u_domain }}"

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()