Skip to content

Instantly share code, notes, and snippets.

@MksYi
Created August 13, 2018 17:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MksYi/78f1260488280ac677bc7691fce9cbf7 to your computer and use it in GitHub Desktop.
Save MksYi/78f1260488280ac677bc7691fce9cbf7 to your computer and use it in GitHub Desktop.
Django +Apache wsgi conf
"""
WSGI config for MyProject project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/
"""
import os
os.environ["DJANGO_SETTINGS_MODULE"] = "MyProject.settings"
#if Use ENV
#import sys
#from os.path import join,dirname,abspath
#PROJECT_DIR = dirname(dirname(abspath(__file__)))
#sys.path.insert(0, PROJECT_DIR)
#sys.path.append('/home/<User_Name>/MyProject/env/lib/python3.5/site-packages')
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment