Created
October 3, 2011 09:28
-
-
Save ggendre/1258774 to your computer and use it in GitHub Desktop.
django & dotcloud wsgi file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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