-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathuser_name_pythonanywhere_com_wsgi.py
More file actions
34 lines (27 loc) · 1.05 KB
/
user_name_pythonanywhere_com_wsgi.py
File metadata and controls
34 lines (27 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# This file contains the WSGI configuration required to serve up your
# web application at http://user_name.pythonanywhere.com/
# It works by setting the variable 'application' to a WSGI handler of some
# description.
#
# The below has been auto-generated for your Django project
import os
import sys
# add your project directory to the sys.path
path = '/home/user_name/prdsite/prdsite_proj/'
if path not in sys.path:
# sys.path.insert(0, path)
sys.path.append(path)
os.chdir(path)
# set environment variable to tell django where your settings.py is
# os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
os.environ.setdefault('DJANGO_SETTINGS_MODULE',
'prdsite.settings')
# Import your Django project's configuration
import django
django.setup()
# Import the Django WSGI to handle any requests
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
# # serve django via WSGI
# from django.core.wsgi import get_wsgi_application
# application = get_wsgi_application()