Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os, os.path
- import sys
- # Unless your project is already on your PYTHONPATH by default, you need to add it:
- # project_directory should point to your project's parent directory.
- project_directory = os.path.join(os.path.dirname(__file__), '..')
- if project_directory not in sys.path:
- sys.path.append(project_directory);
- os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
- # Create the wsgi application.
- import django.core.handlers.wsgi
- application = django.core.handlers.wsgi.WSGIHandler()
- # Run the monitor
- import settings
- if settings.DEBUG:
- try:
- import monitor
- monitor.start(interval=1.0)
- except:
- pass
Add Comment
Please, Sign In to add comment