New django.wsgi for Django 1.7
This commit is contained in:
1 parent
1badcc5633
commit
5e9163fb4b
1 file changed
+3
-15
+3
-15
@@ -1,17 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mdb.settings")
|
||||||
from os.path import dirname, join
|
|
||||||
|
|
||||||
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
|
from django.core.wsgi import get_wsgi_application
|
||||||
|
application = get_wsgi_application()
|
||||||
# fix path
|
|
||||||
def map_path(target_name=''):
|
|
||||||
'''Enables path names to be decided at runtime.'''
|
|
||||||
return join(dirname(__file__), target_name).replace('\\', '/')
|
|
||||||
|
|
||||||
path = map_path("..")
|
|
||||||
if path not in sys.path:
|
|
||||||
sys.path.append(path)
|
|
||||||
|
|
||||||
import django.core.handlers.wsgi
|
|
||||||
application = django.core.handlers.wsgi.WSGIHandler()
|
|
||||||
Reference in new issue
Block a user