Guest User

Untitled

a guest
Jul 17th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. import os, os.path
  2. import sys
  3.  
  4. # Unless your project is already on your PYTHONPATH by default, you need to add it:
  5. # project_directory should point to your project's parent directory.
  6. project_directory = os.path.join(os.path.dirname(__file__), '..')
  7. if project_directory not in sys.path:
  8. sys.path.append(project_directory);
  9.  
  10. os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
  11.  
  12. # Create the wsgi application.
  13. import django.core.handlers.wsgi
  14. application = django.core.handlers.wsgi.WSGIHandler()
  15.  
  16. # Run the monitor
  17. import settings
  18. if settings.DEBUG:
  19. try:
  20. import monitor
  21. monitor.start(interval=1.0)
  22. except:
  23. pass
Add Comment
Please, Sign In to add comment