-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
28 lines (22 loc) · 699 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import os
# import sys
os.environ['DJANGO_SETTINGS_MODULE'] = 'ldfnh.settings'
# Force Django to reload its settings.
from django.conf import settings
settings._target = None
import django.core.handlers.wsgi
import django.core.signals
import django.db
import django.dispatch
# Log errors.
#import logging
#def log_exception(*args, **kwds):
# logging.exception('Exception in request:')
#
#django.dispatch.Signal.connect(
# django.core.signals.got_request_exception, log_exception)
# Unregister the rollback event handler.
django.dispatch.Signal.disconnect(
django.core.signals.got_request_exception,
django.db._rollback_on_exception)
app = django.core.handlers.wsgi.WSGIHandler()