Created
June 26, 2017 15:10
-
-
Save feliphebueno/ad60b65c4a371876bff824d3accbec04 to your computer and use it in GitHub Desktop.
Exemplo de wsgi.py de uma Django App para rodar com o Apache mod_wsgi multi applications
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
WSGI config for YourDjangoApp 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/1.10/howto/deployment/wsgi/ | |
""" | |
import os | |
import sys | |
# API Root | |
sys.path.insert(0, "/path/to/YourDjangoApp/") | |
# Path da pasta site-packages/ que contém as dependências deste projeto(mod_wsgi only) | |
sys.path.insert(1, "/path/to/your-virtual-env/lib/python3.5/site-packages/") | |
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "YourDjangoApp.settings") | |
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