Line | |
---|
1 | #!/usr/bin/python |
---|
2 | |
---|
3 | import sys, os |
---|
4 | |
---|
5 | # the path to this file on the server |
---|
6 | mypath = os.path.dirname(__file__) |
---|
7 | # name of the project |
---|
8 | myproject = 'dashwiki' |
---|
9 | |
---|
10 | # ./python is a directory containing the Django installation and additional |
---|
11 | # Python modules |
---|
12 | #sys.path += ["%s/python" % (mypath)] |
---|
13 | |
---|
14 | # your Django project containing the settings.py |
---|
15 | #sys.path += ["%s/%s" % (mypath, myproject)] |
---|
16 | sys.path += [mypath] |
---|
17 | |
---|
18 | # settings of your django page module |
---|
19 | os.environ['DJANGO_SETTINGS_MODULE'] = '%s.settings' % (myproject) |
---|
20 | |
---|
21 | if __name__ == '__main__': |
---|
22 | import django.core.handlers.wsgi |
---|
23 | import wsgiref.handlers |
---|
24 | application = django.core.handlers.wsgi.WSGIHandler() |
---|
25 | wsgiref.handlers.CGIHandler().run(application) |
---|
Note: See
TracBrowser
for help on using the repository browser.