Last active
December 14, 2015 10:18
-
-
Save jmaupetit/5070624 to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/eval PYTHON_VERSION=2.6 PYTHONPATH=/your/python/path/ python | |
import os | |
import sys | |
_PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | |
sys.path.insert(0, _PROJECT_DIR) | |
sys.path.insert(0, os.path.dirname(_PROJECT_DIR)) | |
_PROJECT_NAME = _PROJECT_DIR.split('/')[-1] | |
os.environ['DJANGO_SETTINGS_MODULE'] = "%s.settings" % _PROJECT_NAME | |
# django-configuration requirements | |
os.environ['DJANGO_CONFIGURATION'] = 'Prod' # Your configuration here | |
from configurations import importer | |
importer.install() | |
from django.core.servers.fastcgi import runfastcgi | |
runfastcgi(method="threaded", daemonize="false") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment