Skip to content

Instantly share code, notes, and snippets.

@myusuf3
Created September 14, 2011 02:58
Show Gist options
  • Save myusuf3/1215760 to your computer and use it in GitHub Desktop.
Save myusuf3/1215760 to your computer and use it in GitHub Desktop.
import os
import sys
# this line is added so python is aware of the application
# this is absolute path to the app.
sys.path.append('/srv/www/brodidyouhear.com/brodidyouhear')
# this is simply a check to see if the site is in syspath as well this is one directory up from application
path = '/srv/www/brodidyouhear.com'
if path not in sys.path:
sys.path.insert(0,'/srv/www/brodidyouhear.com')
# this is the settings file needed to start django with.
os.environ['DJANGO_SETTINGS_MODULE'] = 'brodidyouhear.settings'
# import handler and activate application
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment