Browse Source
added base path autodetection, so people don't have to configure *anything* anymore...
Natenom/support-murmur-13-1446181288462
v0.3
added base path autodetection, so people don't have to configure *anything* anymore...
Natenom/support-murmur-13-1446181288462
v0.3
Michael Ziegler
16 years ago
3 changed files with 43 additions and 24 deletions
@ -1,13 +1,22 @@ |
|||
import os, sys |
|||
|
|||
# Set this to the same path you used in settings.py. |
|||
MUMBLE_DJANGO_ROOT = '/home/mistagee/mumble-django/hgrep'; |
|||
# Set this to the same path you used in settings.py, or None for auto-detection. |
|||
MUMBLE_DJANGO_ROOT = None; |
|||
|
|||
### DO NOT CHANGE ANYTHING BELOW THIS LINE ### |
|||
|
|||
import os, sys |
|||
from os.path import join, dirname, abspath |
|||
|
|||
# Path auto-detection |
|||
if not MUMBLE_DJANGO_ROOT: |
|||
MUMBLE_DJANGO_ROOT = dirname(abspath(__file__)); |
|||
|
|||
# environment variables |
|||
sys.path.append( MUMBLE_DJANGO_ROOT ) |
|||
sys.path.append( MUMBLE_DJANGO_ROOT+'/pyweb' ) |
|||
sys.path.append( join( MUMBLE_DJANGO_ROOT, 'pyweb' ) ) |
|||
os.environ['DJANGO_SETTINGS_MODULE'] = 'pyweb.settings' |
|||
|
|||
# WSGI handler |
|||
import django.core.handlers.wsgi |
|||
application = django.core.handlers.wsgi.WSGIHandler() |
|||
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue