2 os.environ['DJANGO_SETTINGS_MODULE'] = '{0}.settings'
4 # Google App Engine imports.
5 from google.appengine.ext.webapp import util
7 # Force Django to reload its settings.
8 from django.conf import settings
9 settings._target = None
11 import django.core.handlers.wsgi
12 import django.core.signals
14 import django.dispatch.dispatcher
17 #django.dispatch.dispatcher.connect(
18 # log_exception, django.core.signals.got_request_exception)
20 # Unregister the rollback event handler.
21 django.dispatch.dispatcher.disconnect(
22 django.db._rollback_on_exception,
23 django.core.signals.got_request_exception)
26 # Create a Django application for WSGI.
27 application = django.core.handlers.wsgi.WSGIHandler()
29 # Run the WSGI CGI handler with that application.
30 util.run_wsgi_app(application)
32 if __name__ == '__main__':