Skip to content

Instantly share code, notes, and snippets.

@ggendre
Created October 3, 2011 09:28
Show Gist options
  • Save ggendre/1258774 to your computer and use it in GitHub Desktop.
Save ggendre/1258774 to your computer and use it in GitHub Desktop.
django & dotcloud wsgi file
import os
import sys
appName="myApp" #change this with your application name
#this way, you can use "import myfile" instead of "import myproject.myapp.myfile" everywhere in your app.
sys.path.append(os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), appName)))
os.environ['DJANGO_SETTINGS_MODULE'] = appName+'.settings'
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