· 7 years ago · Nov 18, 2018, 05:56 PM
1UnboundLocalError at /api/payments/create_payments/
2local variable 'period' referenced before assignment
3
4Request Method: POST
5Request URL: http://95.163.210.46/api/payments/create_payments/
6Django Version: 2.0.4
7Python Executable: /usr/local/bin/python
8Python Version: 3.6.4
9Python Path: ['/skynet', '/usr/local/bin', '/usr/local/lib/python36.zip', '/usr/local/lib/python3.6', '/usr/local/lib/python3.6/lib-dynload', '/usr/local/lib/python3.6/site-packages', '/skynet']
10Server time: Sun, 18 Nov 2018 20:52:48 +0300
11Installed Applications:
12('django.contrib.admin',
13 'django.contrib.admindocs',
14 'django.contrib.auth',
15 'django.contrib.contenttypes',
16 'django.contrib.sessions',
17 'django.contrib.messages',
18 'django.contrib.staticfiles',
19 'django.contrib.humanize',
20 'django_extensions',
21 'nested_admin',
22 'rest_framework',
23 'drf_yasg',
24 'dynamic_rest',
25 'rest_framework_jwt',
26 'corsheaders',
27 'django_celery_results',
28 'django_celery_beat',
29 'djoser',
30 'cacheops',
31 'web.apps.swagger',
32 'web.apps.users',
33 'web.apps.area',
34 'web.apps.catalog',
35 'web.apps.timetable',
36 'web.apps.motivation',
37 'health_check',
38 'health_check.db',
39 'health_check.cache',
40 'health_check.storage',
41 'health_check.contrib.psutil',
42 'debug_toolbar')
43Installed Middleware:
44('django.middleware.security.SecurityMiddleware',
45 'django.contrib.sessions.middleware.SessionMiddleware',
46 'corsheaders.middleware.CorsMiddleware',
47 'django.middleware.common.CommonMiddleware',
48 'django.middleware.csrf.CsrfViewMiddleware',
49 'django.contrib.auth.middleware.AuthenticationMiddleware',
50 'django.contrib.messages.middleware.MessageMiddleware',
51 'django.middleware.clickjacking.XFrameOptionsMiddleware',
52 'debug_toolbar.middleware.DebugToolbarMiddleware')
53
54
55Traceback:
56
57File "/skynet/web/apps/motivation/models.py" in grid
58 1464. )[0]
59
60File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py" in __getitem__
61 307. return qs._result_cache[0]
62
63During handling of the above exception (list index out of range), another exception occurred:
64
65File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
66 35. response = get_response(request)
67
68File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
69 128. response = self.process_exception_by_middleware(e, request)
70
71File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
72 126. response = wrapped_callback(request, *callback_args, **callback_kwargs)
73
74File "/usr/local/lib/python3.6/site-packages/django/views/decorators/csrf.py" in wrapped_view
75 54. return view_func(*args, **kwargs)
76
77File "/usr/local/lib/python3.6/site-packages/django/views/generic/base.py" in view
78 69. return self.dispatch(request, *args, **kwargs)
79
80File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py" in dispatch
81 494. response = self.handle_exception(exc)
82
83File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py" in handle_exception
84 454. self.raise_uncaught_exception(exc)
85
86File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py" in dispatch
87 491. response = handler(request, *args, **kwargs)
88
89File "/skynet/web/apps/motivation/views.py" in post
90 224. create_payments()
91
92File "/skynet/web/apps/motivation/utils.py" in create_payments
93 598. position=position
94
95File "/usr/local/lib/python3.6/site-packages/django/db/models/manager.py" in manager_method
96 82. return getattr(self.get_queryset(), name)(*args, **kwargs)
97
98File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py" in create
99 417. obj.save(force_insert=True, using=self.db)
100
101File "/skynet/web/apps/motivation/models.py" in save
102 1262. self.fact_bonus = self.calculate_fact_bonus()
103
104File "/skynet/web/apps/motivation/models.py" in calculate_fact_bonus
105 1483. self.focus_list + self.cashback_list + self.grid
106
107File "/skynet/web/apps/motivation/models.py" in grid
108 1474. except period.DoesNotExist:
109
110Exception Type: UnboundLocalError at /api/payments/create_payments/
111Exception Value: local variable 'period' referenced before assignment
112Request information:
113USER: jimik961@gmail.com
114
115GET: No GET data
116
117POST: No POST data
118
119FILES: No FILES data
120
121COOKIES: No cookie data
122
123META:
124CONTENT_LENGTH = '2'
125CONTENT_TYPE = 'application/json'
126HTTP_ACCEPT = 'application/json, text/plain, */*'
127HTTP_ACCEPT_ENCODING = 'gzip, deflate'
128HTTP_ACCEPT_LANGUAGE = 'ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7'
129HTTP_AUTHORIZATION = 'JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxOSwidXNlcm5hbWUiOiJqaW1pazk2MUBnbWFpbC5jb20iLCJleHAiOjE1NDI1NzI5MzB9.HDqwMKrnhm5D6Qo96qFGEjjKcS5nka5P0lmzkgl50z0'
130HTTP_CONNECTION = 'close'
131HTTP_HOST = '95.163.210.46'
132HTTP_ORIGIN = 'http://localhost:4200'
133HTTP_REFERER = 'http://localhost:4200/table/payment'
134HTTP_USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36'
135HTTP_X_FORWARDED_FOR = '37.190.78.229'
136HTTP_X_REAL_IP = '37.190.78.229'
137PATH_INFO = '/api/payments/create_payments/'
138QUERY_STRING = ''
139RAW_URI = '/api/payments/create_payments/'
140REMOTE_ADDR = '10.42.86.194'
141REMOTE_PORT = '58470'
142REQUEST_METHOD = 'POST'
143SCRIPT_NAME = ''
144SERVER_NAME = '0.0.0.0'
145SERVER_PORT = '8000'
146SERVER_PROTOCOL = 'HTTP/1.0'
147SERVER_SOFTWARE = 'gunicorn/19.7.1'
148gunicorn.socket = <socket.socket fd=14, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('10.42.165.132', 8000), raddr=('10.42.86.194', 58470)>
149wsgi.errors = <gunicorn.http.wsgi.WSGIErrorsWrapper object at 0x7fdedf930a90>
150wsgi.file_wrapper = ''
151wsgi.input = <gunicorn.http.body.Body object at 0x7fdedf930240>
152wsgi.multiprocess = True
153wsgi.multithread = False
154wsgi.run_once = False
155wsgi.url_scheme = 'http'
156wsgi.version = '(1, 0)'
157
158Settings:
159Using settings module web.settings
160ABSOLUTE_URL_OVERRIDES = {}
161ADMINS = []
162ALLOWED_HOSTS = ['127.0.0.1', '185.224.215.63', '95.163.210.46']
163APPEND_SLASH = True
164AUTHENTICATION_BACKENDS = ['django.contrib.auth.backends.ModelBackend']
165AUTH_PASSWORD_VALIDATORS = '********************'
166AUTH_USER_MODEL = 'users.User'
167BASE_DIR = '/skynet'
168CACHEOPS = {}
169CACHEOPS_REDIS = {'host': 'localhost', 'port': 6379}
170CACHES = {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}
171CACHE_MIDDLEWARE_ALIAS = 'default'
172CACHE_MIDDLEWARE_KEY_PREFIX = '********************'
173CACHE_MIDDLEWARE_SECONDS = 600
174CELERY_ACCEPT_CONTENT = ['application/json']
175CELERY_BEAT_SCHEDULE = {'create_sales_plans_for_new_mount': {'task': 'motivation.tasks.create_sales_plans_for_new_mount', 'schedule': <crontab: * 1 * 15 * (m/h/d/dM/MY)>}}
176CELERY_BROKER_URL = 'redis://localhost:6379'
177CELERY_RESULT_BACKEND = 'redis://localhost:6379'
178CELERY_RESULT_SERIALIZER = 'json'
179CELERY_TASK_SERIALIZER = 'json'
180CORS_ORIGIN_ALLOW_ALL = True
181CSRF_COOKIE_AGE = 31449600
182CSRF_COOKIE_DOMAIN = None
183CSRF_COOKIE_HTTPONLY = False
184CSRF_COOKIE_NAME = 'csrftoken'
185CSRF_COOKIE_PATH = '/'
186CSRF_COOKIE_SECURE = False
187CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure'
188CSRF_HEADER_NAME = 'HTTP_X_CSRFTOKEN'
189CSRF_TRUSTED_ORIGINS = []
190CSRF_USE_SESSIONS = False
191DATABASES = {'default': {'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'skynet', 'USER': 'postgres', 'PASSWORD': '********************', 'PORT': '5432', 'HOST': 'postgres', 'CONN_MAX_AGE': 900, 'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'OPTIONS': {}, 'TIME_ZONE': None, 'TEST': {'CHARSET': None, 'COLLATION': None, 'NAME': None, 'MIRROR': None}}}
192DATABASE_ROUTERS = []
193DATA_UPLOAD_MAX_MEMORY_SIZE = 2621440
194DATA_UPLOAD_MAX_NUMBER_FIELDS = 1000
195DATETIME_FORMAT = 'N j, Y, P'
196DATETIME_INPUT_FORMATS = ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M', '%m/%d/%y']
197DATE_FORMAT = 'N j, Y'
198DATE_INPUT_FORMATS = ['%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y']
199DEBUG = True
200DEBUG_PROPAGATE_EXCEPTIONS = False
201DEBUG_TOOLBAR_CONFIG = {'SHOW_TEMPLATE_CONTEXT': True, 'ENABLE_STACKTRACES': True}
202DECIMAL_SEPARATOR = '.'
203DEFAULT_CHARSET = 'utf-8'
204DEFAULT_CONTENT_TYPE = 'text/html'
205DEFAULT_EXCEPTION_REPORTER_FILTER = 'django.views.debug.SafeExceptionReporterFilter'
206DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
207DEFAULT_FROM_EMAIL = 'webmaster@localhost'
208DEFAULT_INDEX_TABLESPACE = ''
209DEFAULT_TABLESPACE = ''
210DISALLOWED_USER_AGENTS = []
211DJOSER = {'SERIALIZERS': {'user': 'web.apps.users.serializers.UserProfileSerializer'}}
212DYNAMIC_REST = {'DEBUG': True, 'ENABLE_BULK_PARTIAL_CREATION': True, 'ENABLE_BULK_UPDATE': True}
213EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
214EMAIL_FROM = 'sayhello@picasel.agency'
215EMAIL_HOST = 'smtp.sendgrid.net'
216EMAIL_HOST_PASSWORD = '********************'
217EMAIL_HOST_USER = 'chongkal'
218EMAIL_PORT = 587
219EMAIL_SSL_CERTFILE = None
220EMAIL_SSL_KEYFILE = '********************'
221EMAIL_SUBJECT_PREFIX = '[Django] '
222EMAIL_TIMEOUT = None
223EMAIL_USE_LOCALTIME = False
224EMAIL_USE_SSL = False
225EMAIL_USE_TLS = True
226FILE_CHARSET = 'utf-8'
227FILE_UPLOAD_DIRECTORY_PERMISSIONS = None
228FILE_UPLOAD_HANDLERS = ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler']
229FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440
230FILE_UPLOAD_PERMISSIONS = None
231FILE_UPLOAD_TEMP_DIR = None
232FIRST_DAY_OF_WEEK = 0
233FIXTURE_DIRS = []
234FORCE_SCRIPT_NAME = None
235FORMAT_MODULE_PATH = None
236FORM_RENDERER = 'django.forms.renderers.DjangoTemplates'
237IGNORABLE_404_URLS = "(re.compile('/favicon.ico'), re.compile('/robots.txt'))"
238INSTALLED_APPS = "('django.contrib.admin', 'django.contrib.admindocs', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.humanize', 'django_extensions', 'nested_admin', 'rest_framework', 'drf_yasg', 'dynamic_rest', 'rest_framework_jwt', 'corsheaders', 'django_celery_results', 'django_celery_beat', 'djoser', 'cacheops', 'web.apps.swagger', 'web.apps.users', 'web.apps.area', 'web.apps.catalog', 'web.apps.timetable', 'web.apps.motivation', 'health_check', 'health_check.db', 'health_check.cache', 'health_check.storage', 'health_check.contrib.psutil', 'debug_toolbar')"
239INTERNAL_IPS = '127.0.0.1:8000'
240JWT_AUTH = {'JWT_EXPIRATION_DELTA': datetime.timedelta(0, 10000)}
241LANGUAGES = [('af', 'Afrikaans'), ('ar', 'Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('dsb', 'Lower Sorbian'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kab', 'Kabyle'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('my', 'Burmese'), ('nb', 'Norwegian BokmГÒl'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')]
242LANGUAGES_BIDI = ['he', 'ar', 'fa', 'ur']
243LANGUAGE_CODE = 'en'
244LANGUAGE_COOKIE_AGE = None
245LANGUAGE_COOKIE_DOMAIN = None
246LANGUAGE_COOKIE_NAME = 'django_language'
247LANGUAGE_COOKIE_PATH = '/'
248LOCALE_PATHS = "('/skynet/web/conf/locale',)"
249LOGGING = {'version': 1, 'disable_existing_loggers': True, 'root': {'level': 'WARNING', 'handlers': ['console']}, 'formatters': {'verbose': {'format': '%(asctime)s %(levelname)s %(message)s'}}, 'handlers': {'console': {'level': 'DEBUG', 'class': 'logging.StreamHandler', 'formatter': 'verbose'}}, 'loggers': {'django.db.backends': {'level': 'INFO', 'handlers': ['console'], 'propagate': False}, 'django.request': {'level': 'ERROR', 'handlers': ['console'], 'propagate': False}, 'django.server': {'level': 'INFO', 'handlers': ['console'], 'propagate': False}, 'django.security': {'level': 'INFO', 'handlers': ['console'], 'propagate': False}}}
250LOGGING_CONFIG = 'logging.config.dictConfig'
251LOGIN_REDIRECT_URL = '/accounts/profile/'
252LOGIN_URL = '/accounts/login/'
253LOGOUT_REDIRECT_URL = None
254MANAGERS = []
255MEDIA_ROOT = '/skynet/web/media'
256MEDIA_URL = '/media/'
257MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage'
258MIDDLEWARE = "('django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'corsheaders.middleware.CorsMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'debug_toolbar.middleware.DebugToolbarMiddleware')"
259MIGRATION_MODULES = {}
260MONTH_DAY_FORMAT = 'F j'
261NUMBER_GROUPING = 0
262PASSWORD_HASHERS = '********************'
263PASSWORD_RESET_TIMEOUT_DAYS = '********************'
264PREPEND_WWW = False
265PRODUCTION = False
266PROJECT_DIR = '/skynet/web'
267RAVEN_CONFIG = {'dsn': 'https://715e5801fb954856a8ad4b6eac5962c7:7333b166cf644414bb5f6422fa3ca2c0@sentry.io/1262720', 'release': '7d1409c734150b6561fec6af3761add4dce49f9c'}
268REMOTE_DB = {'NAME': 'PhilipsCRM', 'USER': 'user', 'PASSWORD': '********************', 'HOST': 'host:port'}
269REST_FRAMEWORK = {'DEFAULT_RENDERER_CLASSES': ['rest_framework.renderers.JSONRenderer', 'dynamic_rest.renderers.DynamicBrowsableAPIRenderer'], 'DEFAULT_PERMISSION_CLASSES': ('rest_framework.permissions.AllowAny',), 'DEFAULT_AUTHENTICATION_CLASSES': ('web.utils.CsrfExemptSessionAuthentication', 'rest_framework_jwt.authentication.JSONWebTokenAuthentication', 'rest_framework.authentication.BasicAuthentication')}
270ROOT_URLCONF = 'web.urls'
271SECRET_KEY = '********************'
272SECURE_BROWSER_XSS_FILTER = False
273SECURE_CONTENT_TYPE_NOSNIFF = False
274SECURE_HSTS_INCLUDE_SUBDOMAINS = False
275SECURE_HSTS_PRELOAD = False
276SECURE_HSTS_SECONDS = 0
277SECURE_PROXY_SSL_HEADER = None
278SECURE_REDIRECT_EXEMPT = []
279SECURE_SSL_HOST = None
280SECURE_SSL_REDIRECT = False
281SERVER_EMAIL = 'root@localhost'
282SESSION_CACHE_ALIAS = 'default'
283SESSION_COOKIE_AGE = 5184000
284SESSION_COOKIE_DOMAIN = None
285SESSION_COOKIE_HTTPONLY = True
286SESSION_COOKIE_NAME = 'sid'
287SESSION_COOKIE_PATH = '/'
288SESSION_COOKIE_SECURE = False
289SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db'
290SESSION_EXPIRE_AT_BROWSER_CLOSE = False
291SESSION_FILE_PATH = None
292SESSION_SAVE_EVERY_REQUEST = False
293SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
294SETTINGS_MODULE = 'web.settings'
295SHORT_DATETIME_FORMAT = 'm/d/Y P'
296SHORT_DATE_FORMAT = 'm/d/Y'
297SIGNING_BACKEND = 'django.core.signing.TimestampSigner'
298SILENCED_SYSTEM_CHECKS = []
299STATICFILES_DIRS = []
300STATICFILES_FINDERS = "('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder')"
301STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.ManifestStaticFilesStorage'
302STATIC_ROOT = '/skynet/web/static'
303STATIC_URL = '/static/'
304TEMPLATES = [{'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['/skynet/web/templates'], 'OPTIONS': {'debug': True, 'context_processors': ['django.contrib.auth.context_processors.auth', 'django.template.context_processors.debug', 'django.template.context_processors.i18n', 'django.template.context_processors.media', 'django.template.context_processors.static', 'django.template.context_processors.tz', 'django.template.context_processors.request', 'django.contrib.messages.context_processors.messages'], 'loaders': ('django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader')}}]
305TEST_NON_SERIALIZED_APPS = []
306TEST_RUNNER = 'django.test.runner.DiscoverRunner'
307THOUSAND_SEPARATOR = ','
308TIME_FORMAT = 'P'
309TIME_INPUT_FORMATS = ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']
310TIME_ZONE = 'Europe/Moscow'
311USE_ETAGS = False
312USE_I18N = True
313USE_L10N = True
314USE_THOUSAND_SEPARATOR = False
315USE_TZ = True
316USE_X_FORWARDED_HOST = False
317USE_X_FORWARDED_PORT = False
318WSGI_APPLICATION = 'web.wsgi.application'
319X_FRAME_OPTIONS = 'SAMEORIGIN'
320YEAR_MONTH_FORMAT = 'F Y'
321_DEBUG_ENV = 'true'
322_PRODUCTION_ENV = None
323
324
325You're seeing this error because you have DEBUG = True in your
326Django settings file. Change that to False, and Django will
327display a standard page generated by the handler for this status code.