Posted By

magicrebirth on 05/24/11


Tagged

django wsgi


Versions (?)

Adding custom django package to WSGI settings


 / Published in: Django
 

URL: https://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/

  1. # in your project.wsgi file
  2.  
  3. import os, sys
  4.  
  5. #add the desired django version at the beginning of the path; mind you must provide the Django folder as downloaded!
  6. sys.path.insert(1, "/path/to/Django/")
  7.  
  8. sys.path.append('/my/project/root/') # add things as usual...
  9.  
  10. # the rest is the normal wsgi stuff...
  11.  
  12. os.environ['DJANGO_SETTINGS_MODULE'] = 'project.settings'
  13.  
  14. import django.core.handlers.wsgi
  15. application = django.core.handlers.wsgi.WSGIHandler()

Report this snippet  

You need to login to post a comment.