wsgi.py 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. """
  2. WSGI config for acreditacion project.
  3. It exposes the WSGI callable as a module-level variable named ``application``.
  4. For more information on this file, see
  5. https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/
  6. """
  7. import os
  8. # import sys
  9. # # add the hellodjango project path into the sys.path
  10. # sys.path.append('<PATH_TO_MY_DJANGO_PROJECT>/acredt')
  11. # # add the virtualenv site-packages path to the sys.path
  12. # sys.path.append('<PATH_TO_VIRTUALENV>/lib/site-packages')
  13. from django.core.wsgi import get_wsgi_application
  14. from mezzanine.utils.conf import real_project_name
  15. # para habilitar autenticacion antes de servir archivos estaticos en /static/media
  16. # fuente: https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/apache-auth/
  17. from django.contrib.auth.handlers.modwsgi import check_password
  18. os.environ.setdefault("DJANGO_SETTINGS_MODULE",
  19. "%s.settings" % real_project_name("acredt"))
  20. from django.core.handlers.wsgi import WSGIHandler
  21. #application = WSGIHandler()
  22. application = get_wsgi_application()