wsgi.py 902 B

123456789101112131415161718192021222324252627282930
  1. """
  2. WSGI config for dsp 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/3.0/howto/deployment/wsgi/
  6. """
  7. import os,sys
  8. from django.core.wsgi import get_wsgi_application
  9. ####os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'dsp.settings')
  10. #os.environ["DJANGO_SETTINGS_MODULE"] = 'mobeesia.settings'
  11. #application = get_wsgi_application()
  12. # Calculate the path based on the location of the WSGI script.
  13. apache_configuration= os.path.dirname(__file__)
  14. project = os.path.dirname(apache_configuration)
  15. workspace = os.path.dirname(project)
  16. sys.path.append(workspace)
  17. sys.path.append(project)
  18. # Add the path to 3rd party django application and to django itself.
  19. sys.path.append('/home/ec2-user')
  20. os.environ["DJANGO_SETTINGS_MODULE"] = 'mobeesia.settings'
  21. application = get_wsgi_application()