Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- import sys
- import logging
- from appengine_django import InstallAppengineHelperForDjango
- InstallAppengineHelperForDjango()
- from appengine_django import have_django_zip
- from appengine_django import django_zip_path
- # Google App Engine imports.
- from google.appengine.ext.webapp import util
- # Import the part of Django that we use here.
- import django.core.handlers.wsgi
- def main():
- # Ensure the Django zipfile is in the path if required.
- if have_django_zip and django_zip_path not in sys.path:
- sys.path.insert(1, django_zip_path)
- # Create a Django application for WSGI.
- application = django.core.handlers.wsgi.WSGIHandler()
- # Run the WSGI CGI handler with that application.
- util.run_wsgi_app(application)
- if __name__ == '__main__':
- main()
Add Comment
Please, Sign In to add comment