Mögliche Warnstreiks bei VW rücken näher
Wolfenbütteler Zeitung
OperationalError at /cn/story/89677855/stats/
(2002, "Can't connect to MySQL server on 'db.netsupport24.net' (99)")
Request Method: | GET |
---|---|
Request URL: | https://api.crawler.inquence.net/cn/story/89677855/stats/ |
Django Version: | 1.10 |
Exception Type: | OperationalError |
Exception Value: | (2002, "Can't connect to MySQL server on 'db.netsupport24.net' (99)") |
Exception Location: | /usr/local/lib/python3.6/site-packages/MySQLdb/connections.py in __init__, line 185 |
Python Executable: | /usr/local/bin/uwsgi |
Python Version: | 3.6.12 |
Python Path: | ['.', '', '/usr/local/lib/python36.zip', '/usr/local/lib/python3.6', '/usr/local/lib/python3.6/lib-dynload', '/usr/local/lib/python3.6/site-packages', '/app'] |
Server time: | Wed, 3 Mar 2021 01:35:15 +0000 |
Traceback Switch to copy-and-paste view
-
/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py
inensure_connection
def ensure_connection(self):
"""
Guarantees that a connection to the database is established.
"""
if self.connection is None:
with self.wrap_database_errors:
self.connect()
...
# ##### Backend-specific wrappers for PEP-249 connection methods #####
def _cursor(self):
self.ensure_connection()
with self.wrap_database_errors:
Variable Value self <django.db.backends.mysql.base.DatabaseWrapper object at 0x7efbf33385c0>
-
/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py
inconnect
# Reset parameters defining when to close the connection
max_age = self.settings_dict['CONN_MAX_AGE']
self.close_at = None if max_age is None else time.time() + max_age
self.closed_in_transaction = False
self.errors_occurred = False
# Establish the connection
conn_params = self.get_connection_params()
self.connection = self.get_new_connection(conn_params)
...
self.set_autocommit(self.settings_dict['AUTOCOMMIT'])
self.init_connection_state()
connection_created.send(sender=self.__class__, connection=self)
self.run_on_commit = []
Variable Value conn_params {'charset': 'utf8', 'client_flag': 2, 'conv': {0: <function typecast_decimal at 0x7efbf39fef28>, 1: <class 'int'>, 2: <class 'int'>, 3: <class 'int'>, 4: <class 'float'>, 5: <class 'float'>, 7: <function DateTime_or_None at 0x7efbf32e8488>, 8: <class 'int'>, 9: <class 'int'>, 10: <function Date_or_None at 0x7efbf32e8620>, 11: <function typecast_time at 0x7efbf39fee18>, 12: <function DateTime_or_None at 0x7efbf32e8488>, 13: <class 'int'>, 15: <class 'bytes'>, 245: <class 'bytes'>, 246: <function typecast_decimal at 0x7efbf39fef28>, 249: <class 'bytes'>, 250: <class 'bytes'>, 251: <class 'bytes'>, 252: <class 'bytes'>, 253: <class 'bytes'>, 254: <class 'bytes'>, <class 'decimal.Decimal'>: <function Decimal2Literal at 0x7efbf32e8ea0>, <class 'datetime.timedelta'>: <function DateTimeDelta2literal at 0x7efbf32e8730>, <class 'datetime.datetime'>: <function adapt_datetime_warn_on_aware_datetime at 0x7efbf334abf8>, <class 'datetime.date'>: <function Thing2Literal at 0x7efbf32e8e18>, <class 'array.array'>: <function array2Str at 0x7efbf32e8f28>, <class 'bool'>: <function Bool2Str at 0x7efbf32e8b70>, <class 'float'>: <function Float2Str at 0x7efbf32e8d08>, <class 'int'>: <function Thing2Str at 0x7efbf32e8c80>, <class 'NoneType'>: <function None2NULL at 0x7efbf32e8d90>, <class 'set'>: <function Set2Str at 0x7efbf32e8bf8>}, 'db': 'inq_crawler', 'host': 'db.netsupport24.net', 'passwd': 'U9ut9r7zuUVn', 'port': 3306, 'user': 'inq_crawler'}
max_age 0
self <django.db.backends.mysql.base.DatabaseWrapper object at 0x7efbf33385c0>
-
/usr/local/lib/python3.6/site-packages/django/db/backends/mysql/base.py
inget_new_connection
# We need the number of potentially affected rows after an
# "UPDATE", not the number of changed rows.
kwargs['client_flag'] = CLIENT.FOUND_ROWS
kwargs.update(settings_dict['OPTIONS'])
return kwargs
def get_new_connection(self, conn_params):
conn = Database.connect(**conn_params)
...
conn.encoders[SafeText] = conn.encoders[six.text_type]
conn.encoders[SafeBytes] = conn.encoders[bytes]
return conn
def init_connection_state(self):
if self.features.is_sql_auto_is_null_enabled:
Variable Value conn_params {'charset': 'utf8', 'client_flag': 2, 'conv': {0: <function typecast_decimal at 0x7efbf39fef28>, 1: <class 'int'>, 2: <class 'int'>, 3: <class 'int'>, 4: <class 'float'>, 5: <class 'float'>, 7: <function DateTime_or_None at 0x7efbf32e8488>, 8: <class 'int'>, 9: <class 'int'>, 10: <function Date_or_None at 0x7efbf32e8620>, 11: <function typecast_time at 0x7efbf39fee18>, 12: <function DateTime_or_None at 0x7efbf32e8488>, 13: <class 'int'>, 15: <class 'bytes'>, 245: <class 'bytes'>, 246: <function typecast_decimal at 0x7efbf39fef28>, 249: <class 'bytes'>, 250: <class 'bytes'>, 251: <class 'bytes'>, 252: <class 'bytes'>, 253: <class 'bytes'>, 254: <class 'bytes'>, <class 'decimal.Decimal'>: <function Decimal2Literal at 0x7efbf32e8ea0>, <class 'datetime.timedelta'>: <function DateTimeDelta2literal at 0x7efbf32e8730>, <class 'datetime.datetime'>: <function adapt_datetime_warn_on_aware_datetime at 0x7efbf334abf8>, <class 'datetime.date'>: <function Thing2Literal at 0x7efbf32e8e18>, <class 'array.array'>: <function array2Str at 0x7efbf32e8f28>, <class 'bool'>: <function Bool2Str at 0x7efbf32e8b70>, <class 'float'>: <function Float2Str at 0x7efbf32e8d08>, <class 'int'>: <function Thing2Str at 0x7efbf32e8c80>, <class 'NoneType'>: <function None2NULL at 0x7efbf32e8d90>, <class 'set'>: <function Set2Str at 0x7efbf32e8bf8>}, 'db': 'inq_crawler', 'host': 'db.netsupport24.net', 'passwd': 'U9ut9r7zuUVn', 'port': 3306, 'user': 'inq_crawler'}
self <django.db.backends.mysql.base.DatabaseWrapper object at 0x7efbf33385c0>
-
/usr/local/lib/python3.6/site-packages/MySQLdb/__init__.py
inConnect
return bytes(x)
def Connect(*args, **kwargs):
"""Factory function for connections.Connection."""
from MySQLdb.connections import Connection
return Connection(*args, **kwargs)
...
connect = Connection = Connect
__all__ = [
"BINARY",
Variable Value Connection <class 'MySQLdb.connections.Connection'>
args ()
kwargs {'charset': 'utf8', 'client_flag': 2, 'conv': {0: <function typecast_decimal at 0x7efbf39fef28>, 1: <class 'int'>, 2: <class 'int'>, 3: <class 'int'>, 4: <class 'float'>, 5: <class 'float'>, 7: <function DateTime_or_None at 0x7efbf32e8488>, 8: <class 'int'>, 9: <class 'int'>, 10: <function Date_or_None at 0x7efbf32e8620>, 11: <function typecast_time at 0x7efbf39fee18>, 12: <function DateTime_or_None at 0x7efbf32e8488>, 13: <class 'int'>, 15: <class 'bytes'>, 245: <class 'bytes'>, 246: <function typecast_decimal at 0x7efbf39fef28>, 249: <class 'bytes'>, 250: <class 'bytes'>, 251: <class 'bytes'>, 252: <class 'bytes'>, 253: <class 'bytes'>, 254: <class 'bytes'>, <class 'decimal.Decimal'>: <function Decimal2Literal at 0x7efbf32e8ea0>, <class 'datetime.timedelta'>: <function DateTimeDelta2literal at 0x7efbf32e8730>, <class 'datetime.datetime'>: <function adapt_datetime_warn_on_aware_datetime at 0x7efbf334abf8>, <class 'datetime.date'>: <function Thing2Literal at 0x7efbf32e8e18>, <class 'array.array'>: <function array2Str at 0x7efbf32e8f28>, <class 'bool'>: <function Bool2Str at 0x7efbf32e8b70>, <class 'float'>: <function Float2Str at 0x7efbf32e8d08>, <class 'int'>: <function Thing2Str at 0x7efbf32e8c80>, <class 'NoneType'>: <function None2NULL at 0x7efbf32e8d90>, <class 'set'>: <function Set2Str at 0x7efbf32e8bf8>}, 'db': 'inq_crawler', 'host': 'db.netsupport24.net', 'passwd': 'U9ut9r7zuUVn', 'port': 3306, 'user': 'inq_crawler'}
-
/usr/local/lib/python3.6/site-packages/MySQLdb/connections.py
in__init__
client_flag |= CLIENT.MULTI_RESULTS
kwargs2["client_flag"] = client_flag
# PEP-249 requires autocommit to be initially off
autocommit = kwargs2.pop("autocommit", False)
super().__init__(*args, **kwargs2)
...
self.cursorclass = cursorclass
self.encoders = {k: v for k, v in conv.items() if type(k) is not int}
# XXX THIS IS GARBAGE: While this is just a garbage and undocumented,
# Django 1.11 depends on it. And they don't fix it because
# they are in security-only fix mode.
Variable Value CLIENT <module 'MySQLdb.constants.CLIENT' from '/usr/local/lib/python3.6/site-packages/MySQLdb/constants/CLIENT.py'>
FIELD_TYPE <module 'MySQLdb.constants.FIELD_TYPE' from '/usr/local/lib/python3.6/site-packages/MySQLdb/constants/FIELD_TYPE.py'>
__class__ <class 'MySQLdb.connections.Connection'>
_bytes_or_str ((128, <class 'bytes'>), (None, <class 'str'>))
args ()
autocommit False
charset 'utf8'
client_flag 196610
client_version (10, 3)
conv {0: <function typecast_decimal at 0x7efbf39fef28>, 1: <class 'int'>, 2: <class 'int'>, 3: <class 'int'>, 4: <class 'float'>, 5: <class 'float'>, 7: <function DateTime_or_None at 0x7efbf32e8488>, 8: <class 'int'>, 9: <class 'int'>, 10: <function Date_or_None at 0x7efbf32e8620>, 11: <function typecast_time at 0x7efbf39fee18>, 12: <function DateTime_or_None at 0x7efbf32e8488>, 13: <class 'int'>, 15: <class 'bytes'>, 245: <class 'bytes'>, 246: <function typecast_decimal at 0x7efbf39fef28>, 249: <class 'bytes'>, 250: <class 'bytes'>, 251: <class 'bytes'>, 252: <class 'bytes'>, 253: <class 'bytes'>, 254: <class 'bytes'>, <class 'decimal.Decimal'>: <function Decimal2Literal at 0x7efbf32e8ea0>, <class 'datetime.timedelta'>: <function DateTimeDelta2literal at 0x7efbf32e8730>, <class 'datetime.datetime'>: <function adapt_datetime_warn_on_aware_datetime at 0x7efbf334abf8>, <class 'datetime.date'>: <function Thing2Literal at 0x7efbf32e8e18>, <class 'array.array'>: <function array2Str at 0x7efbf32e8f28>, <class 'bool'>: <function Bool2Str at 0x7efbf32e8b70>, <class 'float'>: <function Float2Str at 0x7efbf32e8d08>, <class 'int'>: <function Thing2Str at 0x7efbf32e8c80>, <class 'NoneType'>: <function None2NULL at 0x7efbf32e8d90>, <class 'set'>: <function Set2Str at 0x7efbf32e8bf8>}
conv2 {0: <function typecast_decimal at 0x7efbf39fef28>, 1: <class 'int'>, 2: <class 'int'>, 3: <class 'int'>, 4: <class 'float'>, 5: <class 'float'>, 7: <function DateTime_or_None at 0x7efbf32e8488>, 8: <class 'int'>, 9: <class 'int'>, 10: <function Date_or_None at 0x7efbf32e8620>, 11: <function typecast_time at 0x7efbf39fee18>, 12: <function DateTime_or_None at 0x7efbf32e8488>, 13: <class 'int'>, 15: <class 'bytes'>, 245: <class 'bytes'>, 246: <function typecast_decimal at 0x7efbf39fef28>, 249: <class 'bytes'>, 250: <class 'bytes'>, 251: <class 'bytes'>, 252: <class 'bytes'>, 253: <class 'bytes'>, 254: <class 'bytes'>, <class 'decimal.Decimal'>: <function Decimal2Literal at 0x7efbf32e8ea0>, <class 'datetime.timedelta'>: <function DateTimeDelta2literal at 0x7efbf32e8730>, <class 'datetime.datetime'>: <function adapt_datetime_warn_on_aware_datetime at 0x7efbf334abf8>, <class 'datetime.date'>: <function Thing2Literal at 0x7efbf32e8e18>, <class 'array.array'>: <function array2Str at 0x7efbf32e8f28>, <class 'bool'>: <function Bool2Str at 0x7efbf32e8b70>, <class 'float'>: <function Float2Str at 0x7efbf32e8d08>, <class 'int'>: <function Thing2Str at 0x7efbf32e8c80>, <class 'NoneType'>: <function None2NULL at 0x7efbf32e8d90>, <class 'set'>: <function Set2Str at 0x7efbf32e8bf8>}
conversions {0: <class 'decimal.Decimal'>, 1: <class 'int'>, 2: <class 'int'>, 3: <class 'int'>, 4: <class 'float'>, 5: <class 'float'>, 7: <function DateTime_or_None at 0x7efbf32e8488>, 8: <class 'int'>, 9: <class 'int'>, 10: <function Date_or_None at 0x7efbf32e8620>, 11: <function TimeDelta_or_None at 0x7efbf32e8510>, 12: <function DateTime_or_None at 0x7efbf32e8488>, 13: <class 'int'>, 15: <class 'bytes'>, 245: <class 'bytes'>, 246: <class 'decimal.Decimal'>, 249: <class 'bytes'>, 250: <class 'bytes'>, 251: <class 'bytes'>, 252: <class 'bytes'>, 253: <class 'bytes'>, 254: <class 'bytes'>, <class 'decimal.Decimal'>: <function Decimal2Literal at 0x7efbf32e8ea0>, <class 'datetime.timedelta'>: <function DateTimeDelta2literal at 0x7efbf32e8730>, <class 'datetime.datetime'>: <function DateTime2literal at 0x7efbf32e86a8>, <class 'datetime.date'>: <function Thing2Literal at 0x7efbf32e8e18>, <class 'array.array'>: <function array2Str at 0x7efbf32e8f28>, <class 'bool'>: <function Bool2Str at 0x7efbf32e8b70>, <class 'float'>: <function Float2Str at 0x7efbf32e8d08>, <class 'int'>: <function Thing2Str at 0x7efbf32e8c80>, <class 'NoneType'>: <function None2NULL at 0x7efbf32e8d90>, <class 'set'>: <function Set2Str at 0x7efbf32e8bf8>}
cursorclass <class 'MySQLdb.cursors.Cursor'>
k 245
kwargs {'charset': 'utf8', 'client_flag': 2, 'conv': {0: <function typecast_decimal at 0x7efbf39fef28>, 1: <class 'int'>, 2: <class 'int'>, 3: <class 'int'>, 4: <class 'float'>, 5: <class 'float'>, 7: <function DateTime_or_None at 0x7efbf32e8488>, 8: <class 'int'>, 9: <class 'int'>, 10: <function Date_or_None at 0x7efbf32e8620>, 11: <function typecast_time at 0x7efbf39fee18>, 12: <function DateTime_or_None at 0x7efbf32e8488>, 13: <class 'int'>, 15: <class 'bytes'>, 245: <class 'bytes'>, 246: <function typecast_decimal at 0x7efbf39fef28>, 249: <class 'bytes'>, 250: <class 'bytes'>, 251: <class 'bytes'>, 252: <class 'bytes'>, 253: <class 'bytes'>, 254: <class 'bytes'>, <class 'decimal.Decimal'>: <function Decimal2Literal at 0x7efbf32e8ea0>, <class 'datetime.timedelta'>: <function DateTimeDelta2literal at 0x7efbf32e8730>, <class 'datetime.datetime'>: <function adapt_datetime_warn_on_aware_datetime at 0x7efbf334abf8>, <class 'datetime.date'>: <function Thing2Literal at 0x7efbf32e8e18>, <class 'array.array'>: <function array2Str at 0x7efbf32e8f28>, <class 'bool'>: <function Bool2Str at 0x7efbf32e8b70>, <class 'float'>: <function Float2Str at 0x7efbf32e8d08>, <class 'int'>: <function Thing2Str at 0x7efbf32e8c80>, <class 'NoneType'>: <function None2NULL at 0x7efbf32e8d90>, <class 'set'>: <function Set2Str at 0x7efbf32e8bf8>}, 'db': 'inq_crawler', 'host': 'db.netsupport24.net', 'passwd': 'U9ut9r7zuUVn', 'port': 3306, 'user': 'inq_crawler'}
kwargs2 {'charset': 'utf8', 'client_flag': 196610, 'conv': {0: <function typecast_decimal at 0x7efbf39fef28>, 1: <class 'int'>, 2: <class 'int'>, 3: <class 'int'>, 4: <class 'float'>, 5: <class 'float'>, 7: <function DateTime_or_None at 0x7efbf32e8488>, 8: <class 'int'>, 9: <class 'int'>, 10: <function Date_or_None at 0x7efbf32e8620>, 11: <function typecast_time at 0x7efbf39fee18>, 12: <function DateTime_or_None at 0x7efbf32e8488>, 13: <class 'int'>, 15: <class 'bytes'>, 245: <class 'bytes'>, 246: <function typecast_decimal at 0x7efbf39fef28>, 249: <class 'bytes'>, 250: <class 'bytes'>, 251: <class 'bytes'>, 252: <class 'bytes'>, 253: <class 'bytes'>, 254: <class 'bytes'>, <class 'decimal.Decimal'>: <function Decimal2Literal at 0x7efbf32e8ea0>, <class 'datetime.timedelta'>: <function DateTimeDelta2literal at 0x7efbf32e8730>, <class 'datetime.datetime'>: <function adapt_datetime_warn_on_aware_datetime at 0x7efbf334abf8>, <class 'datetime.date'>: <function Thing2Literal at 0x7efbf32e8e18>, <class 'array.array'>: <function array2Str at 0x7efbf32e8f28>, <class 'bool'>: <function Bool2Str at 0x7efbf32e8b70>, <class 'float'>: <function Float2Str at 0x7efbf32e8d08>, <class 'int'>: <function Thing2Str at 0x7efbf32e8c80>, <class 'NoneType'>: <function None2NULL at 0x7efbf32e8d90>, <class 'set'>: <function Set2Str at 0x7efbf32e8bf8>}, 'db': 'inq_crawler', 'host': 'db.netsupport24.net', 'passwd': 'U9ut9r7zuUVn', 'port': 3306, 'user': 'inq_crawler'}
proxy <built-in function proxy>
self <_mysql.connection open to '(null)' at 0x5655581186b8>
sql_mode ''
use_unicode True
v <class 'bytes'>
The above exception ((2002, "Can't connect to MySQL server on 'db.netsupport24.net' (99)")) was the direct cause of the following exception:
-
/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py
ininner
This decorator is automatically applied to all middleware to ensure that
no middleware leaks an exception and that the next middleware in the stack
can rely on getting a response instead of an exception.
"""
@wraps(get_response, assigned=available_attrs(get_response))
def inner(request):
try:
response = get_response(request)
...
except Exception as exc:
response = response_for_exception(request, exc)
return response
return inner
Variable Value exc OperationalError(2002, "Can't connect to MySQL server on 'db.netsupport24.net' (99)")
get_response <bound method BaseHandler._legacy_get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x7efbf27800b8>>
request <WSGIRequest: GET '/cn/story/89677855/stats/'>
-
/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py
in_legacy_get_response
# Apply request middleware
for middleware_method in self._request_middleware:
response = middleware_method(request)
if response:
break
if response is None:
response = self._get_response(request)
...
return response
Variable Value middleware_method <bound method MessageMiddleware.process_request of <django.contrib.messages.middleware.MessageMiddleware object at 0x7efbf23cdb70>>
request <WSGIRequest: GET '/cn/story/89677855/stats/'>
response None
self <django.core.handlers.wsgi.WSGIHandler object at 0x7efbf27800b8>
-
/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py
in_get_response
break
if response is None:
wrapped_callback = self.make_view_atomic(callback)
try:
response = wrapped_callback(request, *callback_args, **callback_kwargs)
except Exception as e:
response = self.process_exception_by_middleware(e, request)
...
# Complain if the view returned None (a common error).
if response is None:
if isinstance(callback, types.FunctionType): # FBV
view_name = callback.__name__
else: # CBV
Variable Value callback <function StoryStats at 0x7efbf1e7e2f0>
callback_args ()
callback_kwargs {'pk': '89677855'}
middleware_method <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x7efbf23b3828>>
request <WSGIRequest: GET '/cn/story/89677855/stats/'>
resolver <RegexURLResolver 'project.urls' (None:None) ^/>
resolver_match ResolverMatch(func=citynews.api.v1.StoryStats, args=(), kwargs={'pk': '89677855'}, url_name=story-stats, app_names=[], namespaces=['cn'])
response None
self <django.core.handlers.wsgi.WSGIHandler object at 0x7efbf27800b8>
wrapped_callback <function StoryStats at 0x7efbf1e7e2f0>
-
/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py
in_get_response
response = middleware_method(request, callback, callback_args, callback_kwargs)
if response:
break
if response is None:
wrapped_callback = self.make_view_atomic(callback)
try:
response = wrapped_callback(request, *callback_args, **callback_kwargs)
...
except Exception as e:
response = self.process_exception_by_middleware(e, request)
# Complain if the view returned None (a common error).
if response is None:
if isinstance(callback, types.FunctionType): # FBV
Variable Value callback <function StoryStats at 0x7efbf1e7e2f0>
callback_args ()
callback_kwargs {'pk': '89677855'}
middleware_method <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x7efbf23b3828>>
request <WSGIRequest: GET '/cn/story/89677855/stats/'>
resolver <RegexURLResolver 'project.urls' (None:None) ^/>
resolver_match ResolverMatch(func=citynews.api.v1.StoryStats, args=(), kwargs={'pk': '89677855'}, url_name=story-stats, app_names=[], namespaces=['cn'])
response None
self <django.core.handlers.wsgi.WSGIHandler object at 0x7efbf27800b8>
wrapped_callback <function StoryStats at 0x7efbf1e7e2f0>
-
/usr/local/lib/python3.6/site-packages/django/views/decorators/csrf.py
inwrapped_view
"""
Marks a view function as being exempt from the CSRF view protection.
"""
# We could just do view_func.csrf_exempt = True, but decorators
# are nicer if they don't have side-effects, so we return a new
# function.
def wrapped_view(*args, **kwargs):
return view_func(*args, **kwargs)
...
wrapped_view.csrf_exempt = True
return wraps(view_func, assigned=available_attrs(view_func))(wrapped_view)
Variable Value args (<WSGIRequest: GET '/cn/story/89677855/stats/'>,)
kwargs {'pk': '89677855'}
view_func <function StoryStats at 0x7efbf1e7e268>
-
/usr/local/lib/python3.6/site-packages/django/views/generic/base.py
inview
def view(request, *args, **kwargs):
self = cls(**initkwargs)
if hasattr(self, 'get') and not hasattr(self, 'head'):
self.head = self.get
self.request = request
self.args = args
self.kwargs = kwargs
return self.dispatch(request, *args, **kwargs)
...
view.view_class = cls
view.view_initkwargs = initkwargs
# take name and docstring from class
update_wrapper(view, cls, updated=())
Variable Value args ()
cls <class 'citynews.api.v1.StoryStats'>
initkwargs {}
kwargs {'pk': '89677855'}
request <WSGIRequest: GET '/cn/story/89677855/stats/'>
self <citynews.api.v1.StoryStats object at 0x7efbf1b57400>
-
/usr/local/lib/python3.6/site-packages/rest_framework/views.py
indispatch
self.http_method_not_allowed)
else:
handler = self.http_method_not_allowed
response = handler(request, *args, **kwargs)
except Exception as exc:
response = self.handle_exception(exc)
...
self.response = self.finalize_response(request, response, *args, **kwargs)
return self.response
def options(self, request, *args, **kwargs):
"""
Variable Value args ()
kwargs {'pk': '89677855'}
request <rest_framework.request.Request object at 0x7efbf1c4d4e0>
self <citynews.api.v1.StoryStats object at 0x7efbf1b57400>
-
/usr/local/lib/python3.6/site-packages/rest_framework/views.py
inhandle_exception
exception_handler = self.settings.EXCEPTION_HANDLER
context = self.get_exception_handler_context()
response = exception_handler(exc, context)
if response is None:
self.raise_uncaught_exception(exc)
...
response.exception = True
return response
def raise_uncaught_exception(self, exc):
if settings.DEBUG:
Variable Value context {'args': (), 'kwargs': {'pk': '89677855'}, 'request': <rest_framework.request.Request object at 0x7efbf1c4d4e0>, 'view': <citynews.api.v1.StoryStats object at 0x7efbf1b57400>}
exc OperationalError(2002, "Can't connect to MySQL server on 'db.netsupport24.net' (99)")
exception_handler <function exception_handler at 0x7efbf20f5ae8>
response None
self <citynews.api.v1.StoryStats object at 0x7efbf1b57400>
-
/usr/local/lib/python3.6/site-packages/rest_framework/views.py
indispatch
self.args = args
self.kwargs = kwargs
request = self.initialize_request(request, *args, **kwargs)
self.request = request
self.headers = self.default_response_headers # deprecate?
try:
self.initial(request, *args, **kwargs)
...
# Get the appropriate handler method
if request.method.lower() in self.http_method_names:
handler = getattr(self, request.method.lower(),
self.http_method_not_allowed)
else:
Variable Value args ()
kwargs {'pk': '89677855'}
request <rest_framework.request.Request object at 0x7efbf1c4d4e0>
self <citynews.api.v1.StoryStats object at 0x7efbf1b57400>
-
/usr/local/lib/python3.6/site-packages/rest_framework/views.py
ininitial
request.accepted_renderer, request.accepted_media_type = neg
# Determine the API version, if versioning is in use.
version, scheme = self.determine_version(request, *args, **kwargs)
request.version, request.versioning_scheme = version, scheme
# Ensure that the incoming request is permitted
self.perform_authentication(request)
...
self.check_permissions(request)
self.check_throttles(request)
def finalize_response(self, request, response, *args, **kwargs):
"""
Returns the final response object.
Variable Value args ()
kwargs {'pk': '89677855'}
neg (<rest_framework.renderers.TemplateHTMLRenderer object at 0x7efbf1c4d358>, 'text/html')
request <rest_framework.request.Request object at 0x7efbf1c4d4e0>
scheme None
self <citynews.api.v1.StoryStats object at 0x7efbf1b57400>
version None
-
/usr/local/lib/python3.6/site-packages/rest_framework/views.py
inperform_authentication
"""
Perform authentication on the incoming request.
Note that if you override this and simply 'pass', then authentication
will instead be performed lazily, the first time either
`request.user` or `request.auth` is accessed.
"""
request.user
...
def check_permissions(self, request):
"""
Check if the request should be permitted.
Raises an appropriate exception if the request is not permitted.
"""
Variable Value request <rest_framework.request.Request object at 0x7efbf1c4d4e0>
self <citynews.api.v1.StoryStats object at 0x7efbf1b57400>
-
/usr/local/lib/python3.6/site-packages/rest_framework/request.py
in__getattribute__
def __getattribute__(self, attr):
"""
If an attribute does not exist on this instance, then we also attempt
to proxy it to the underlying HttpRequest object.
"""
try:
return super(Request, self).__getattribute__(attr)
...
except AttributeError:
info = sys.exc_info()
try:
return getattr(self._request, attr)
except AttributeError:
six.reraise(info[0], info[1], info[2].tb_next)
Variable Value __class__ <class 'rest_framework.request.Request'>
attr 'user'
self <rest_framework.request.Request object at 0x7efbf1c4d4e0>
-
/usr/local/lib/python3.6/site-packages/rest_framework/request.py
inuser
@property
def user(self):
"""
Returns the user associated with the current request, as authenticated
by the authentication classes provided to the request.
"""
if not hasattr(self, '_user'):
self._authenticate()
...
return self._user
@user.setter
def user(self, value):
"""
Sets the user on the current request. This is necessary to maintain
Variable Value self <rest_framework.request.Request object at 0x7efbf1c4d4e0>
-
/usr/local/lib/python3.6/site-packages/rest_framework/request.py
in_authenticate
"""
Attempt to authenticate the request using each authentication instance
in turn.
Returns a three-tuple of (authenticator, user, authtoken).
"""
for authenticator in self.authenticators:
try:
user_auth_tuple = authenticator.authenticate(self)
...
except exceptions.APIException:
self._not_authenticated()
raise
if user_auth_tuple is not None:
self._authenticator = authenticator
Variable Value authenticator <rest_framework.authentication.BasicAuthentication object at 0x7efbf1c4d048>
self <rest_framework.request.Request object at 0x7efbf1c4d4e0>
user_auth_tuple None
-
/usr/local/lib/python3.6/site-packages/rest_framework/authentication.py
inauthenticate
try:
auth_parts = base64.b64decode(auth[1]).decode(HTTP_HEADER_ENCODING).partition(':')
except (TypeError, UnicodeDecodeError, binascii.Error):
msg = _('Invalid basic header. Credentials not correctly base64 encoded.')
raise exceptions.AuthenticationFailed(msg)
userid, password = auth_parts[0], auth_parts[2]
return self.authenticate_credentials(userid, password)
...
def authenticate_credentials(self, userid, password):
"""
Authenticate the userid and password against username and password.
"""
credentials = {
Variable Value auth [b'Basic', b'ZnJvbnRlbmQ6YWhqeW4tdHlsLWdqa21wamRmbnRrbQ==']
auth_parts ('frontend', ':', 'ahjyn-tyl-gjkmpjdfntkm')
password 'ahjyn-tyl-gjkmpjdfntkm'
request <rest_framework.request.Request object at 0x7efbf1c4d4e0>
self <rest_framework.authentication.BasicAuthentication object at 0x7efbf1c4d048>
userid 'frontend'
-
/usr/local/lib/python3.6/site-packages/rest_framework/authentication.py
inauthenticate_credentials
"""
Authenticate the userid and password against username and password.
"""
credentials = {
get_user_model().USERNAME_FIELD: userid,
'password': password
}
user = authenticate(**credentials)
...
if user is None:
raise exceptions.AuthenticationFailed(_('Invalid username/password.'))
if not user.is_active:
raise exceptions.AuthenticationFailed(_('User inactive or deleted.'))
Variable Value credentials {'password': 'ahjyn-tyl-gjkmpjdfntkm', 'username': 'frontend'}
password 'ahjyn-tyl-gjkmpjdfntkm'
self <rest_framework.authentication.BasicAuthentication object at 0x7efbf1c4d048>
userid 'frontend'
-
/usr/local/lib/python3.6/site-packages/django/contrib/auth/__init__.py
inauthenticate
try:
inspect.getcallargs(backend.authenticate, **credentials)
except TypeError:
# This backend doesn't accept these credentials as arguments. Try the next one.
continue
try:
user = backend.authenticate(**credentials)
...
except PermissionDenied:
# This backend says to stop in our tracks - this user should not be allowed in at all.
break
if user is None:
continue
# Annotate the user object with the path of the backend.
Variable Value backend <django.contrib.auth.backends.ModelBackend object at 0x7efbf1c22c88>
backend_path 'django.contrib.auth.backends.ModelBackend'
credentials {'password': 'ahjyn-tyl-gjkmpjdfntkm', 'username': 'frontend'}
-
/usr/local/lib/python3.6/site-packages/django/contrib/auth/backends.py
inauthenticate
"""
def authenticate(self, username=None, password=None, **kwargs):
UserModel = get_user_model()
if username is None:
username = kwargs.get(UserModel.USERNAME_FIELD)
try:
user = UserModel._default_manager.get_by_natural_key(username)
...
except UserModel.DoesNotExist:
# Run the default password hasher once to reduce the timing
# difference between an existing and a non-existing user (#20760).
UserModel().set_password(password)
else:
if user.check_password(password) and self.user_can_authenticate(user):
Variable Value UserModel <class 'django.contrib.auth.models.User'>
kwargs {}
password 'ahjyn-tyl-gjkmpjdfntkm'
self <django.contrib.auth.backends.ModelBackend object at 0x7efbf1c22c88>
username 'frontend'
-
/usr/local/lib/python3.6/site-packages/django/contrib/auth/base_user.py
inget_by_natural_key
Generate a random password with the given length and given
allowed_chars. The default value of allowed_chars does not have "I" or
"O" or letters and digits that look similar -- just to avoid confusion.
"""
return get_random_string(length, allowed_chars)
def get_by_natural_key(self, username):
return self.get(**{self.model.USERNAME_FIELD: username})
...
@python_2_unicode_compatible
class AbstractBaseUser(models.Model):
password = models.CharField(_('password'), max_length=128)
last_login = models.DateTimeField(_('last login'), blank=True, null=True)
Variable Value self <django.contrib.auth.models.UserManager object at 0x7efbf2a7af60>
username 'frontend'
-
/usr/local/lib/python3.6/site-packages/django/db/models/manager.py
inmanager_method
def check(self, **kwargs):
return []
@classmethod
def _get_queryset_methods(cls, queryset_class):
def create_method(name, method):
def manager_method(self, *args, **kwargs):
return getattr(self.get_queryset(), name)(*args, **kwargs)
...
manager_method.__name__ = method.__name__
manager_method.__doc__ = method.__doc__
return manager_method
new_methods = {}
# Refs https://bugs.python.org/issue1785.
Variable Value args ()
kwargs {'username': 'frontend'}
name 'get'
self <django.contrib.auth.models.UserManager object at 0x7efbf2a7af60>
-
/usr/local/lib/python3.6/site-packages/django/db/models/query.py
inget
"""
Performs the query and returns a single object matching the given
keyword arguments.
"""
clone = self.filter(*args, **kwargs)
if self.query.can_filter() and not self.query.distinct_fields:
clone = clone.order_by()
num = len(clone)
...
if num == 1:
return clone._result_cache[0]
if not num:
raise self.model.DoesNotExist(
"%s matching query does not exist." %
self.model._meta.object_name
Variable Value args ()
clone Error in formatting: OperationalError: (2002, "Can't connect to MySQL server on 'db.netsupport24.net' (99)")
kwargs {'username': 'frontend'}
self Error in formatting: OperationalError: (2002, "Can't connect to MySQL server on 'db.netsupport24.net' (99)")
-
/usr/local/lib/python3.6/site-packages/django/db/models/query.py
in__len__
def __repr__(self):
data = list(self[:REPR_OUTPUT_SIZE + 1])
if len(data) > REPR_OUTPUT_SIZE:
data[-1] = "...(remaining elements truncated)..."
return '<QuerySet %r>' % data
def __len__(self):
self._fetch_all()
...
return len(self._result_cache)
def __iter__(self):
"""
The queryset iterator protocol uses three nested iterators in the
default case:
Variable Value self Error in formatting: OperationalError: (2002, "Can't connect to MySQL server on 'db.netsupport24.net' (99)")
-
/usr/local/lib/python3.6/site-packages/django/db/models/query.py
in_fetch_all
clone._fields = self._fields
clone.__dict__.update(kwargs)
return clone
def _fetch_all(self):
if self._result_cache is None:
self._result_cache = list(self.iterator())
...
if self._prefetch_related_lookups and not self._prefetch_done:
self._prefetch_related_objects()
def _next_is_sticky(self):
"""
Indicates that the next filter call and the one following that should
Variable Value self Error in formatting: OperationalError: (2002, "Can't connect to MySQL server on 'db.netsupport24.net' (99)")
-
/usr/local/lib/python3.6/site-packages/django/db/models/query.py
in__iter__
def __iter__(self):
queryset = self.queryset
db = queryset.db
compiler = queryset.query.get_compiler(using=db)
# Execute the query. This will also fill compiler.select, klass_info,
# and annotations.
results = compiler.execute_sql()
...
select, klass_info, annotation_col_map = (compiler.select, compiler.klass_info,
compiler.annotation_col_map)
if klass_info is None:
return
model_cls = klass_info['model']
select_fields = klass_info['select_fields']
Variable Value compiler <django.db.backends.mysql.compiler.SQLCompiler object at 0x7efbf1c22048>
db 'default'
queryset Error in formatting: OperationalError: (2002, "Can't connect to MySQL server on 'db.netsupport24.net' (99)")
self <django.db.models.query.ModelIterable object at 0x7efbf1c226a0>
-
/usr/local/lib/python3.6/site-packages/django/db/models/sql/compiler.py
inexecute_sql
raise EmptyResultSet
except EmptyResultSet:
if result_type == MULTI:
return iter([])
else:
return
cursor = self.connection.cursor()
...
try:
cursor.execute(sql, params)
except Exception:
cursor.close()
raise
Variable Value params ('frontend',)
result_type 'multi'
self <django.db.backends.mysql.compiler.SQLCompiler object at 0x7efbf1c22048>
sql ('SELECT `auth_user`.`id`, `auth_user`.`password`, `auth_user`.`last_login`, ' '`auth_user`.`is_superuser`, `auth_user`.`username`, ' '`auth_user`.`first_name`, `auth_user`.`last_name`, `auth_user`.`email`, ' '`auth_user`.`is_staff`, `auth_user`.`is_active`, `auth_user`.`date_joined` ' 'FROM `auth_user` WHERE `auth_user`.`username` = %s')
-
/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py
incursor
def cursor(self):
"""
Creates a cursor, opening a connection if necessary.
"""
self.validate_thread_sharing()
if self.queries_logged:
cursor = self.make_debug_cursor(self._cursor())
...
else:
cursor = self.make_cursor(self._cursor())
return cursor
def commit(self):
"""
Variable Value self <django.db.backends.mysql.base.DatabaseWrapper object at 0x7efbf33385c0>
-
/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py
in_cursor
if self.connection is None:
with self.wrap_database_errors:
self.connect()
# ##### Backend-specific wrappers for PEP-249 connection methods #####
def _cursor(self):
self.ensure_connection()
...
with self.wrap_database_errors:
return self.create_cursor()
def _commit(self):
if self.connection is not None:
with self.wrap_database_errors:
Variable Value self <django.db.backends.mysql.base.DatabaseWrapper object at 0x7efbf33385c0>
-
/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py
inensure_connection
def ensure_connection(self):
"""
Guarantees that a connection to the database is established.
"""
if self.connection is None:
with self.wrap_database_errors:
self.connect()
...
# ##### Backend-specific wrappers for PEP-249 connection methods #####
def _cursor(self):
self.ensure_connection()
with self.wrap_database_errors:
Variable Value self <django.db.backends.mysql.base.DatabaseWrapper object at 0x7efbf33385c0>
-
/usr/local/lib/python3.6/site-packages/django/db/utils.py
in__exit__
dj_exc_value.__cause__ = exc_value
if not hasattr(exc_value, '__traceback__'):
exc_value.__traceback__ = traceback
# Only set the 'errors_occurred' flag for errors that may make
# the connection unusable.
if dj_exc_type not in (DataError, IntegrityError):
self.wrapper.errors_occurred = True
six.reraise(dj_exc_type, dj_exc_value, traceback)
...
def __call__(self, func):
# Note that we are intentionally not using @wraps here for performance
# reasons. Refs #21109.
def inner(*args, **kwargs):
with self:
Variable Value db_exc_type <class 'MySQLdb._exceptions.OperationalError'>
dj_exc_type <class 'django.db.utils.OperationalError'>
dj_exc_value OperationalError(2002, "Can't connect to MySQL server on 'db.netsupport24.net' (99)")
exc_type <class 'MySQLdb._exceptions.OperationalError'>
exc_value OperationalError(2002, "Can't connect to MySQL server on 'db.netsupport24.net' (99)")
self <django.db.utils.DatabaseErrorWrapper object at 0x7efbf1deafd0>
traceback <traceback object at 0x7efbf23d7a88>
-
/usr/local/lib/python3.6/site-packages/django/utils/six.py
inreraise
if PY3:
exec_ = getattr(moves.builtins, "exec")
def reraise(tp, value, tb=None):
if value is None:
value = tp()
if value.__traceback__ is not tb:
raise value.with_traceback(tb)
...
raise value
else:
def exec_(_code_, _globs_=None, _locs_=None):
"""Execute code in a namespace."""
if _globs_ is None:
Variable Value tb <traceback object at 0x7efbf23d7a88>
tp <class 'django.db.utils.OperationalError'>
value OperationalError(2002, "Can't connect to MySQL server on 'db.netsupport24.net' (99)")
-
/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py
inensure_connection
def ensure_connection(self):
"""
Guarantees that a connection to the database is established.
"""
if self.connection is None:
with self.wrap_database_errors:
self.connect()
...
# ##### Backend-specific wrappers for PEP-249 connection methods #####
def _cursor(self):
self.ensure_connection()
with self.wrap_database_errors:
Variable Value self <django.db.backends.mysql.base.DatabaseWrapper object at 0x7efbf33385c0>
-
/usr/local/lib/python3.6/site-packages/django/db/backends/base/base.py
inconnect
# Reset parameters defining when to close the connection
max_age = self.settings_dict['CONN_MAX_AGE']
self.close_at = None if max_age is None else time.time() + max_age
self.closed_in_transaction = False
self.errors_occurred = False
# Establish the connection
conn_params = self.get_connection_params()
self.connection = self.get_new_connection(conn_params)
...
self.set_autocommit(self.settings_dict['AUTOCOMMIT'])
self.init_connection_state()
connection_created.send(sender=self.__class__, connection=self)
self.run_on_commit = []
Variable Value conn_params {'charset': 'utf8', 'client_flag': 2, 'conv': {0: <function typecast_decimal at 0x7efbf39fef28>, 1: <class 'int'>, 2: <class 'int'>, 3: <class 'int'>, 4: <class 'float'>, 5: <class 'float'>, 7: <function DateTime_or_None at 0x7efbf32e8488>, 8: <class 'int'>, 9: <class 'int'>, 10: <function Date_or_None at 0x7efbf32e8620>, 11: <function typecast_time at 0x7efbf39fee18>, 12: <function DateTime_or_None at 0x7efbf32e8488>, 13: <class 'int'>, 15: <class 'bytes'>, 245: <class 'bytes'>, 246: <function typecast_decimal at 0x7efbf39fef28>, 249: <class 'bytes'>, 250: <class 'bytes'>, 251: <class 'bytes'>, 252: <class 'bytes'>, 253: <class 'bytes'>, 254: <class 'bytes'>, <class 'decimal.Decimal'>: <function Decimal2Literal at 0x7efbf32e8ea0>, <class 'datetime.timedelta'>: <function DateTimeDelta2literal at 0x7efbf32e8730>, <class 'datetime.datetime'>: <function adapt_datetime_warn_on_aware_datetime at 0x7efbf334abf8>, <class 'datetime.date'>: <function Thing2Literal at 0x7efbf32e8e18>, <class 'array.array'>: <function array2Str at 0x7efbf32e8f28>, <class 'bool'>: <function Bool2Str at 0x7efbf32e8b70>, <class 'float'>: <function Float2Str at 0x7efbf32e8d08>, <class 'int'>: <function Thing2Str at 0x7efbf32e8c80>, <class 'NoneType'>: <function None2NULL at 0x7efbf32e8d90>, <class 'set'>: <function Set2Str at 0x7efbf32e8bf8>}, 'db': 'inq_crawler', 'host': 'db.netsupport24.net', 'passwd': 'U9ut9r7zuUVn', 'port': 3306, 'user': 'inq_crawler'}
max_age 0
self <django.db.backends.mysql.base.DatabaseWrapper object at 0x7efbf33385c0>
-
/usr/local/lib/python3.6/site-packages/django/db/backends/mysql/base.py
inget_new_connection
# We need the number of potentially affected rows after an
# "UPDATE", not the number of changed rows.
kwargs['client_flag'] = CLIENT.FOUND_ROWS
kwargs.update(settings_dict['OPTIONS'])
return kwargs
def get_new_connection(self, conn_params):
conn = Database.connect(**conn_params)
...
conn.encoders[SafeText] = conn.encoders[six.text_type]
conn.encoders[SafeBytes] = conn.encoders[bytes]
return conn
def init_connection_state(self):
if self.features.is_sql_auto_is_null_enabled:
Variable Value conn_params {'charset': 'utf8', 'client_flag': 2, 'conv': {0: <function typecast_decimal at 0x7efbf39fef28>, 1: <class 'int'>, 2: <class 'int'>, 3: <class 'int'>, 4: <class 'float'>, 5: <class 'float'>, 7: <function DateTime_or_None at 0x7efbf32e8488>, 8: <class 'int'>, 9: <class 'int'>, 10: <function Date_or_None at 0x7efbf32e8620>, 11: <function typecast_time at 0x7efbf39fee18>, 12: <function DateTime_or_None at 0x7efbf32e8488>, 13: <class 'int'>, 15: <class 'bytes'>, 245: <class 'bytes'>, 246: <function typecast_decimal at 0x7efbf39fef28>, 249: <class 'bytes'>, 250: <class 'bytes'>, 251: <class 'bytes'>, 252: <class 'bytes'>, 253: <class 'bytes'>, 254: <class 'bytes'>, <class 'decimal.Decimal'>: <function Decimal2Literal at 0x7efbf32e8ea0>, <class 'datetime.timedelta'>: <function DateTimeDelta2literal at 0x7efbf32e8730>, <class 'datetime.datetime'>: <function adapt_datetime_warn_on_aware_datetime at 0x7efbf334abf8>, <class 'datetime.date'>: <function Thing2Literal at 0x7efbf32e8e18>, <class 'array.array'>: <function array2Str at 0x7efbf32e8f28>, <class 'bool'>: <function Bool2Str at 0x7efbf32e8b70>, <class 'float'>: <function Float2Str at 0x7efbf32e8d08>, <class 'int'>: <function Thing2Str at 0x7efbf32e8c80>, <class 'NoneType'>: <function None2NULL at 0x7efbf32e8d90>, <class 'set'>: <function Set2Str at 0x7efbf32e8bf8>}, 'db': 'inq_crawler', 'host': 'db.netsupport24.net', 'passwd': 'U9ut9r7zuUVn', 'port': 3306, 'user': 'inq_crawler'}
self <django.db.backends.mysql.base.DatabaseWrapper object at 0x7efbf33385c0>
-
/usr/local/lib/python3.6/site-packages/MySQLdb/__init__.py
inConnect
return bytes(x)
def Connect(*args, **kwargs):
"""Factory function for connections.Connection."""
from MySQLdb.connections import Connection
return Connection(*args, **kwargs)
...
connect = Connection = Connect
__all__ = [
"BINARY",
Variable Value Connection <class 'MySQLdb.connections.Connection'>
args ()
kwargs {'charset': 'utf8', 'client_flag': 2, 'conv': {0: <function typecast_decimal at 0x7efbf39fef28>, 1: <class 'int'>, 2: <class 'int'>, 3: <class 'int'>, 4: <class 'float'>, 5: <class 'float'>, 7: <function DateTime_or_None at 0x7efbf32e8488>, 8: <class 'int'>, 9: <class 'int'>, 10: <function Date_or_None at 0x7efbf32e8620>, 11: <function typecast_time at 0x7efbf39fee18>, 12: <function DateTime_or_None at 0x7efbf32e8488>, 13: <class 'int'>, 15: <class 'bytes'>, 245: <class 'bytes'>, 246: <function typecast_decimal at 0x7efbf39fef28>, 249: <class 'bytes'>, 250: <class 'bytes'>, 251: <class 'bytes'>, 252: <class 'bytes'>, 253: <class 'bytes'>, 254: <class 'bytes'>, <class 'decimal.Decimal'>: <function Decimal2Literal at 0x7efbf32e8ea0>, <class 'datetime.timedelta'>: <function DateTimeDelta2literal at 0x7efbf32e8730>, <class 'datetime.datetime'>: <function adapt_datetime_warn_on_aware_datetime at 0x7efbf334abf8>, <class 'datetime.date'>: <function Thing2Literal at 0x7efbf32e8e18>, <class 'array.array'>: <function array2Str at 0x7efbf32e8f28>, <class 'bool'>: <function Bool2Str at 0x7efbf32e8b70>, <class 'float'>: <function Float2Str at 0x7efbf32e8d08>, <class 'int'>: <function Thing2Str at 0x7efbf32e8c80>, <class 'NoneType'>: <function None2NULL at 0x7efbf32e8d90>, <class 'set'>: <function Set2Str at 0x7efbf32e8bf8>}, 'db': 'inq_crawler', 'host': 'db.netsupport24.net', 'passwd': 'U9ut9r7zuUVn', 'port': 3306, 'user': 'inq_crawler'}
-
/usr/local/lib/python3.6/site-packages/MySQLdb/connections.py
in__init__
client_flag |= CLIENT.MULTI_RESULTS
kwargs2["client_flag"] = client_flag
# PEP-249 requires autocommit to be initially off
autocommit = kwargs2.pop("autocommit", False)
super().__init__(*args, **kwargs2)
...
self.cursorclass = cursorclass
self.encoders = {k: v for k, v in conv.items() if type(k) is not int}
# XXX THIS IS GARBAGE: While this is just a garbage and undocumented,
# Django 1.11 depends on it. And they don't fix it because
# they are in security-only fix mode.
Variable Value CLIENT <module 'MySQLdb.constants.CLIENT' from '/usr/local/lib/python3.6/site-packages/MySQLdb/constants/CLIENT.py'>
FIELD_TYPE <module 'MySQLdb.constants.FIELD_TYPE' from '/usr/local/lib/python3.6/site-packages/MySQLdb/constants/FIELD_TYPE.py'>
__class__ <class 'MySQLdb.connections.Connection'>
_bytes_or_str ((128, <class 'bytes'>), (None, <class 'str'>))
args ()
autocommit False
charset 'utf8'
client_flag 196610
client_version (10, 3)
conv {0: <function typecast_decimal at 0x7efbf39fef28>, 1: <class 'int'>, 2: <class 'int'>, 3: <class 'int'>, 4: <class 'float'>, 5: <class 'float'>, 7: <function DateTime_or_None at 0x7efbf32e8488>, 8: <class 'int'>, 9: <class 'int'>, 10: <function Date_or_None at 0x7efbf32e8620>, 11: <function typecast_time at 0x7efbf39fee18>, 12: <function DateTime_or_None at 0x7efbf32e8488>, 13: <class 'int'>, 15: <class 'bytes'>, 245: <class 'bytes'>, 246: <function typecast_decimal at 0x7efbf39fef28>, 249: <class 'bytes'>, 250: <class 'bytes'>, 251: <class 'bytes'>, 252: <class 'bytes'>, 253: <class 'bytes'>, 254: <class 'bytes'>, <class 'decimal.Decimal'>: <function Decimal2Literal at 0x7efbf32e8ea0>, <class 'datetime.timedelta'>: <function DateTimeDelta2literal at 0x7efbf32e8730>, <class 'datetime.datetime'>: <function adapt_datetime_warn_on_aware_datetime at 0x7efbf334abf8>, <class 'datetime.date'>: <function Thing2Literal at 0x7efbf32e8e18>, <class 'array.array'>: <function array2Str at 0x7efbf32e8f28>, <class 'bool'>: <function Bool2Str at 0x7efbf32e8b70>, <class 'float'>: <function Float2Str at 0x7efbf32e8d08>, <class 'int'>: <function Thing2Str at 0x7efbf32e8c80>, <class 'NoneType'>: <function None2NULL at 0x7efbf32e8d90>, <class 'set'>: <function Set2Str at 0x7efbf32e8bf8>}
conv2 {0: <function typecast_decimal at 0x7efbf39fef28>, 1: <class 'int'>, 2: <class 'int'>, 3: <class 'int'>, 4: <class 'float'>, 5: <class 'float'>, 7: <function DateTime_or_None at 0x7efbf32e8488>, 8: <class 'int'>, 9: <class 'int'>, 10: <function Date_or_None at 0x7efbf32e8620>, 11: <function typecast_time at 0x7efbf39fee18>, 12: <function DateTime_or_None at 0x7efbf32e8488>, 13: <class 'int'>, 15: <class 'bytes'>, 245: <class 'bytes'>, 246: <function typecast_decimal at 0x7efbf39fef28>, 249: <class 'bytes'>, 250: <class 'bytes'>, 251: <class 'bytes'>, 252: <class 'bytes'>, 253: <class 'bytes'>, 254: <class 'bytes'>, <class 'decimal.Decimal'>: <function Decimal2Literal at 0x7efbf32e8ea0>, <class 'datetime.timedelta'>: <function DateTimeDelta2literal at 0x7efbf32e8730>, <class 'datetime.datetime'>: <function adapt_datetime_warn_on_aware_datetime at 0x7efbf334abf8>, <class 'datetime.date'>: <function Thing2Literal at 0x7efbf32e8e18>, <class 'array.array'>: <function array2Str at 0x7efbf32e8f28>, <class 'bool'>: <function Bool2Str at 0x7efbf32e8b70>, <class 'float'>: <function Float2Str at 0x7efbf32e8d08>, <class 'int'>: <function Thing2Str at 0x7efbf32e8c80>, <class 'NoneType'>: <function None2NULL at 0x7efbf32e8d90>, <class 'set'>: <function Set2Str at 0x7efbf32e8bf8>}
conversions {0: <class 'decimal.Decimal'>, 1: <class 'int'>, 2: <class 'int'>, 3: <class 'int'>, 4: <class 'float'>, 5: <class 'float'>, 7: <function DateTime_or_None at 0x7efbf32e8488>, 8: <class 'int'>, 9: <class 'int'>, 10: <function Date_or_None at 0x7efbf32e8620>, 11: <function TimeDelta_or_None at 0x7efbf32e8510>, 12: <function DateTime_or_None at 0x7efbf32e8488>, 13: <class 'int'>, 15: <class 'bytes'>, 245: <class 'bytes'>, 246: <class 'decimal.Decimal'>, 249: <class 'bytes'>, 250: <class 'bytes'>, 251: <class 'bytes'>, 252: <class 'bytes'>, 253: <class 'bytes'>, 254: <class 'bytes'>, <class 'decimal.Decimal'>: <function Decimal2Literal at 0x7efbf32e8ea0>, <class 'datetime.timedelta'>: <function DateTimeDelta2literal at 0x7efbf32e8730>, <class 'datetime.datetime'>: <function DateTime2literal at 0x7efbf32e86a8>, <class 'datetime.date'>: <function Thing2Literal at 0x7efbf32e8e18>, <class 'array.array'>: <function array2Str at 0x7efbf32e8f28>, <class 'bool'>: <function Bool2Str at 0x7efbf32e8b70>, <class 'float'>: <function Float2Str at 0x7efbf32e8d08>, <class 'int'>: <function Thing2Str at 0x7efbf32e8c80>, <class 'NoneType'>: <function None2NULL at 0x7efbf32e8d90>, <class 'set'>: <function Set2Str at 0x7efbf32e8bf8>}
cursorclass <class 'MySQLdb.cursors.Cursor'>
k 245
kwargs {'charset': 'utf8', 'client_flag': 2, 'conv': {0: <function typecast_decimal at 0x7efbf39fef28>, 1: <class 'int'>, 2: <class 'int'>, 3: <class 'int'>, 4: <class 'float'>, 5: <class 'float'>, 7: <function DateTime_or_None at 0x7efbf32e8488>, 8: <class 'int'>, 9: <class 'int'>, 10: <function Date_or_None at 0x7efbf32e8620>, 11: <function typecast_time at 0x7efbf39fee18>, 12: <function DateTime_or_None at 0x7efbf32e8488>, 13: <class 'int'>, 15: <class 'bytes'>, 245: <class 'bytes'>, 246: <function typecast_decimal at 0x7efbf39fef28>, 249: <class 'bytes'>, 250: <class 'bytes'>, 251: <class 'bytes'>, 252: <class 'bytes'>, 253: <class 'bytes'>, 254: <class 'bytes'>, <class 'decimal.Decimal'>: <function Decimal2Literal at 0x7efbf32e8ea0>, <class 'datetime.timedelta'>: <function DateTimeDelta2literal at 0x7efbf32e8730>, <class 'datetime.datetime'>: <function adapt_datetime_warn_on_aware_datetime at 0x7efbf334abf8>, <class 'datetime.date'>: <function Thing2Literal at 0x7efbf32e8e18>, <class 'array.array'>: <function array2Str at 0x7efbf32e8f28>, <class 'bool'>: <function Bool2Str at 0x7efbf32e8b70>, <class 'float'>: <function Float2Str at 0x7efbf32e8d08>, <class 'int'>: <function Thing2Str at 0x7efbf32e8c80>, <class 'NoneType'>: <function None2NULL at 0x7efbf32e8d90>, <class 'set'>: <function Set2Str at 0x7efbf32e8bf8>}, 'db': 'inq_crawler', 'host': 'db.netsupport24.net', 'passwd': 'U9ut9r7zuUVn', 'port': 3306, 'user': 'inq_crawler'}
kwargs2 {'charset': 'utf8', 'client_flag': 196610, 'conv': {0: <function typecast_decimal at 0x7efbf39fef28>, 1: <class 'int'>, 2: <class 'int'>, 3: <class 'int'>, 4: <class 'float'>, 5: <class 'float'>, 7: <function DateTime_or_None at 0x7efbf32e8488>, 8: <class 'int'>, 9: <class 'int'>, 10: <function Date_or_None at 0x7efbf32e8620>, 11: <function typecast_time at 0x7efbf39fee18>, 12: <function DateTime_or_None at 0x7efbf32e8488>, 13: <class 'int'>, 15: <class 'bytes'>, 245: <class 'bytes'>, 246: <function typecast_decimal at 0x7efbf39fef28>, 249: <class 'bytes'>, 250: <class 'bytes'>, 251: <class 'bytes'>, 252: <class 'bytes'>, 253: <class 'bytes'>, 254: <class 'bytes'>, <class 'decimal.Decimal'>: <function Decimal2Literal at 0x7efbf32e8ea0>, <class 'datetime.timedelta'>: <function DateTimeDelta2literal at 0x7efbf32e8730>, <class 'datetime.datetime'>: <function adapt_datetime_warn_on_aware_datetime at 0x7efbf334abf8>, <class 'datetime.date'>: <function Thing2Literal at 0x7efbf32e8e18>, <class 'array.array'>: <function array2Str at 0x7efbf32e8f28>, <class 'bool'>: <function Bool2Str at 0x7efbf32e8b70>, <class 'float'>: <function Float2Str at 0x7efbf32e8d08>, <class 'int'>: <function Thing2Str at 0x7efbf32e8c80>, <class 'NoneType'>: <function None2NULL at 0x7efbf32e8d90>, <class 'set'>: <function Set2Str at 0x7efbf32e8bf8>}, 'db': 'inq_crawler', 'host': 'db.netsupport24.net', 'passwd': 'U9ut9r7zuUVn', 'port': 3306, 'user': 'inq_crawler'}
proxy <built-in function proxy>
self <_mysql.connection open to '(null)' at 0x5655581186b8>
sql_mode ''
use_unicode True
v <class 'bytes'>
Request information
USER
AnonymousUser
GET
No GET data
POST
No POST data
FILES
No FILES data
COOKIES
No cookie data
META
Variable | Value |
---|---|
CONTENT_LENGTH | '' |
CONTENT_TYPE | '' |
DOCUMENT_ROOT | '/etc/nginx/html' |
HTTP_ACCEPT | '*/*' |
HTTP_AUTHORIZATION | 'Basic ZnJvbnRlbmQ6YWhqeW4tdHlsLWdqa21wamRmbnRrbQ==' |
HTTP_CONNECTION | 'close' |
HTTP_HOST | 'api.crawler.inquence.net' |
HTTP_X_FORWARDED_FOR | '192.168.0.111' |
HTTP_X_FORWARDED_HOST | 'api.crawler.inquence.net' |
HTTP_X_REAL_IP | '192.168.0.111' |
PATH_INFO | '/cn/story/89677855/stats/' |
QUERY_STRING | '' |
REMOTE_ADDR | '172.31.0.1' |
REMOTE_PORT | '57424' |
REQUEST_METHOD | 'GET' |
REQUEST_SCHEME | 'http' |
REQUEST_URI | '/cn/story/89677855/stats/' |
SCRIPT_NAME | '' |
SERVER_NAME | '_' |
SERVER_PORT | '80' |
SERVER_PROTOCOL | 'HTTP/1.0' |
uwsgi.node | b'6ae1cc06a6d0' |
uwsgi.version | b'2.0.15' |
wsgi.errors | <_io.TextIOWrapper name=2 mode='w' encoding='UTF-8'> |
wsgi.file_wrapper | '' |
wsgi.input | <uwsgi._Input object at 0x7efbf2876db0> |
wsgi.multiprocess | True |
wsgi.multithread | False |
wsgi.run_once | False |
wsgi.url_scheme | 'http' |
wsgi.version | (1, 0) |
Settings
Using settings module project.settings.web
Setting | Value |
---|---|
ABSOLUTE_URL_OVERRIDES | {} |
ADMINS | [] |
ALLOWED_HOSTS | ['*'] |
APPEND_SLASH | True |
ARCHIVE_DIR | '/home/INQcrawler/story_content_archive' |
AUTHENTICATION_BACKENDS | ['django.contrib.auth.backends.ModelBackend'] |
AUTH_PASSWORD_VALIDATORS | '********************' |
AUTH_USER_MODEL | 'auth.User' |
BASE_DIR | '/app' |
CACHES | {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 'LOCATION': '6473748f695440b4b11b8d16e09ae115'}, 'fs': {'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache', 'LOCATION': '/var/tmp/crawler_cache'}, 'redis': {'BACKEND': 'django_redis.cache.RedisCache', 'LOCATION': 'redis://localhost:6379/2', 'OPTIONS': {'CLIENT_CLASS': 'django_redis.client.DefaultClient'}}} |
CACHE_MIDDLEWARE_ALIAS | 'default' |
CACHE_MIDDLEWARE_KEY_PREFIX | '********************' |
CACHE_MIDDLEWARE_SECONDS | 600 |
CELERY_BROKER_URL | 'amqp://admin:cach-chijh-sa@localhost:5672//' |
CELERY_MESSAGE_COMPRESSION | 'gzip' |
CORS_ORIGIN_WHITELIST | ('*.netsupport24.com',) |
CSRF_COOKIE_AGE | 31449600 |
CSRF_COOKIE_DOMAIN | None |
CSRF_COOKIE_HTTPONLY | False |
CSRF_COOKIE_NAME | 'csrftoken' |
CSRF_COOKIE_PATH | '/' |
CSRF_COOKIE_SECURE | False |
CSRF_FAILURE_VIEW | 'django.views.csrf.csrf_failure' |
CSRF_HEADER_NAME | 'HTTP_X_CSRFTOKEN' |
CSRF_TRUSTED_ORIGINS | ['*'] |
DATABASES | {'db6453937': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.mysql', 'HOST': 'db.netsupport24.net', 'NAME': 'CN_2_0_0', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': 3306, 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': 'cn_crawler'}, 'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.mysql', 'HOST': 'db.netsupport24.net', 'NAME': 'inq_crawler', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': 3306, 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': 'inq_crawler'}} |
DATABASE_ROUTERS | ['citynews.routers.Router'] |
DATA_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
DATA_UPLOAD_MAX_NUMBER_FIELDS | 1000 |
DATETIME_FORMAT | 'N j, Y, P' |
DATETIME_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'] |
DATE_FORMAT | 'N j, Y' |
DATE_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'] |
DEBUG | True |
DEBUG_PROPAGATE_EXCEPTIONS | False |
DECIMAL_SEPARATOR | '.' |
DEFAULT_CHARSET | 'utf-8' |
DEFAULT_CONTENT_TYPE | 'text/html' |
DEFAULT_EXCEPTION_REPORTER_FILTER | 'django.views.debug.SafeExceptionReporterFilter' |
DEFAULT_FILE_STORAGE | 'django.core.files.storage.FileSystemStorage' |
DEFAULT_FROM_EMAIL | 'webmaster@localhost' |
DEFAULT_INDEX_TABLESPACE | '' |
DEFAULT_TABLESPACE | '' |
DISALLOWED_USER_AGENTS | [] |
DUPLICATE_STORIES_DB | [] |
ELASTIC_SEARCH_AUTH | ('elastic', 'uuehsyehd83746djx') |
ELASTIC_SEARCH_HOSTS | ['https://es.cn.inquence.net:443'] |
ELASTIC_SEARCH_STORIES_INDEX | 'db7_dug_stories-2021.02,db7_dug_stories-2021.01,db7_dug_stories-2020.12,db7_dug_stories-2020.11,db7_dug_stories-2020.10,db7_dug_stories-2020.09' |
ELASTIC_SEARCH_STORIES_INDEX_FORMAT | 'db7_dug_stories-{}.{:02d}' |
ELASTIC_SEARCH_STORIES_MONTHS | 6 |
ELASTIC_SEARCH_VERIFY_SSL | False |
EMAIL_BACKEND | 'django.core.mail.backends.smtp.EmailBackend' |
EMAIL_HOST | 'localhost' |
EMAIL_HOST_PASSWORD | '********************' |
EMAIL_HOST_USER | '' |
EMAIL_PORT | 25 |
EMAIL_SSL_CERTFILE | None |
EMAIL_SSL_KEYFILE | '********************' |
EMAIL_SUBJECT_PREFIX | '[Django] ' |
EMAIL_TIMEOUT | None |
EMAIL_USE_SSL | False |
EMAIL_USE_TLS | False |
EXTERNAL_DBS | {'db6453937'} |
FILE_CHARSET | 'utf-8' |
FILE_UPLOAD_DIRECTORY_PERMISSIONS | None |
FILE_UPLOAD_HANDLERS | ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler'] |
FILE_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
FILE_UPLOAD_PERMISSIONS | None |
FILE_UPLOAD_TEMP_DIR | None |
FIRST_DAY_OF_WEEK | 0 |
FIXTURE_DIRS | [] |
FORCE_SCRIPT_NAME | None |
FORMAT_MODULE_PATH | None |
IGNORABLE_404_URLS | [] |
INSTALLED_APPS | ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.humanize', 'rest_framework', 'corsheaders', 'dboard', 'crawl', 'dconf', 'citynews'] |
INTERNAL_IPS | [] |
LANGUAGES | [('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'), ('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')] |
LANGUAGES_BIDI | ['he', 'ar', 'fa', 'ur'] |
LANGUAGE_CODE | 'en-us' |
LANGUAGE_COOKIE_AGE | None |
LANGUAGE_COOKIE_DOMAIN | None |
LANGUAGE_COOKIE_NAME | 'django_language' |
LANGUAGE_COOKIE_PATH | '/' |
LOCALE_PATHS | [] |
LOGGER | {'handlers': ['console-verbose'], 'level': 'INFO', 'propagate': False} |
LOGGING | {'disable_existing_loggers': True, 'formatters': {'color': {'()': 'colorlog.ColoredFormatter', 'format': '%(log_color)s%(asctime)s [%(levelname)s] ' '%(name)s: %(message)s', 'log_colors': {'CRITICAL': 'bold_red', 'DEBUG': 'blue', 'ERROR': 'red', 'INFO': 'white', 'WARNING': 'yellow'}}, 'color-verbose': {'()': 'colorlog.ColoredFormatter', 'format': '%(log_color)s%(asctime)s ' '[%(levelname)s] %(name)s: ' '%(message)s ' '(%(filename)s:%(lineno)s)', 'log_colors': {'CRITICAL': 'bold_red', 'DEBUG': 'blue', 'ERROR': 'red', 'INFO': 'white', 'WARNING': 'yellow'}}, 'default': {'format': '%(asctime)s ' '%(levelname)s:%(name)s:%(message)s'}, 'verbose': {'format': '%(asctime)s ' '%(levelname)s:%(name)s:%(message)s ' '(%(filename)s:%(lineno)s)'}}, 'handlers': {'console': {'class': 'logging.StreamHandler', 'formatter': 'color'}, 'console-verbose': {'class': 'logging.StreamHandler', 'formatter': 'color-verbose'}}, 'loggers': {'citynews': {'handlers': ['console-verbose'], 'level': 'INFO', 'propagate': False}, 'crawl': {'handlers': ['console-verbose'], 'level': 'INFO', 'propagate': False}, 'dboard': {'handlers': ['console-verbose'], 'level': 'INFO', 'propagate': False}, 'dconf': {'handlers': ['console-verbose'], 'level': 'INFO', 'propagate': False}, 'django': {'handlers': ['console-verbose'], 'level': 'INFO', 'propagate': False}, 'rest_framework': {'handlers': ['console-verbose'], 'level': 'INFO', 'propagate': False}}, 'version': 1} |
LOGGING_CONFIG | 'logging.config.dictConfig' |
LOGIN_REDIRECT_URL | '/accounts/profile/' |
LOGIN_URL | '/accounts/login/' |
LOGOUT_REDIRECT_URL | None |
LOG_COLORS | {'CRITICAL': 'bold_red', 'DEBUG': 'blue', 'ERROR': 'red', 'INFO': 'white', 'WARNING': 'yellow'} |
LOG_DIR | '/var/log/INQcrawler' |
MANAGERS | [] |
MASTER_AUTH_PASS | '********************' |
MASTER_AUTH_USER | None |
MASTER_BASE_URL | None |
MASTER_HOST | None |
MEDIA_ROOT | '/data/media' |
MEDIA_URL | '/media/' |
MESSAGE_STORAGE | 'django.contrib.messages.storage.fallback.FallbackStorage' |
MIDDLEWARE | None |
MIDDLEWARE_CLASSES | ['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.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware'] |
MIGRATION_MODULES | {} |
MODE | None |
MONTH_DAY_FORMAT | 'F j' |
M_MASTER | 'master' |
M_WORKER | 'worker' |
NB_MONGODB | 'Mongodb backend' |
NONREL_DATABASES | {} |
NOW | datetime.datetime(2021, 2, 25, 12, 19, 13, 439630) |
NUMBER_GROUPING | 0 |
PASSWORD_HASHERS | '********************' |
PASSWORD_RESET_TIMEOUT_DAYS | '********************' |
PREPEND_WWW | False |
PROJECT_APPS | ['dboard', 'crawl', 'dconf', 'citynews'] |
REST_FRAMEWORK | {'DEFAULT_AUTHENTICATION_CLASSES': ('rest_framework.authentication.SessionAuthentication', 'rest_framework.authentication.BasicAuthentication', 'dboard.authentication.KeyPassAuthClass'), 'DEFAULT_PERMISSION_CLASSES': ('rest_framework.permissions.IsAdminUser',)} |
ROOT_URLCONF | 'project.urls' |
SECRET_KEY | '********************' |
SECURE_BROWSER_XSS_FILTER | False |
SECURE_CONTENT_TYPE_NOSNIFF | False |
SECURE_HSTS_INCLUDE_SUBDOMAINS | False |
SECURE_HSTS_SECONDS | 0 |
SECURE_PROXY_SSL_HEADER | None |
SECURE_REDIRECT_EXEMPT | [] |
SECURE_SSL_HOST | None |
SECURE_SSL_REDIRECT | False |
SERVER_EMAIL | 'root@localhost' |
SESSION_CACHE_ALIAS | 'default' |
SESSION_COOKIE_AGE | 1209600 |
SESSION_COOKIE_DOMAIN | None |
SESSION_COOKIE_HTTPONLY | True |
SESSION_COOKIE_NAME | 'sessionid' |
SESSION_COOKIE_PATH | '/' |
SESSION_COOKIE_SECURE | False |
SESSION_ENGINE | 'django.contrib.sessions.backends.db' |
SESSION_EXPIRE_AT_BROWSER_CLOSE | False |
SESSION_FILE_PATH | None |
SESSION_SAVE_EVERY_REQUEST | False |
SESSION_SERIALIZER | 'django.contrib.sessions.serializers.JSONSerializer' |
SETTINGS_MODULE | 'project.settings.web' |
SHORT_DATETIME_FORMAT | 'm/d/Y P' |
SHORT_DATE_FORMAT | 'm/d/Y' |
SIGNING_BACKEND | 'django.core.signing.TimestampSigner' |
SILENCED_SYSTEM_CHECKS | [] |
STATICFILES_DIRS | ['/app/static'] |
STATICFILES_FINDERS | ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder'] |
STATICFILES_STORAGE | 'django.contrib.staticfiles.storage.StaticFilesStorage' |
STATIC_ROOT | '/data/static' |
STATIC_URL | '/static/' |
TEMPLATES | [{'APP_DIRS': True, 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['/app/templates'], 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages']}}] |
TEST_NON_SERIALIZED_APPS | [] |
TEST_RUNNER | 'django.test.runner.DiscoverRunner' |
THOUSAND_SEPARATOR | ',' |
TIME_FORMAT | 'P' |
TIME_INPUT_FORMATS | ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M'] |
TIME_ZONE | 'UTC' |
USE_ETAGS | False |
USE_I18N | True |
USE_L10N | True |
USE_THOUSAND_SEPARATOR | False |
USE_TZ | True |
USE_X_FORWARDED_HOST | True |
USE_X_FORWARDED_PORT | True |
VERSION | '1.1' |
WSGI_APPLICATION | 'project.wsgi.application' |
X_FRAME_OPTIONS | 'SAMEORIGIN' |
YEAR_MONTH_FORMAT | 'F Y' |
You're seeing this error because you have DEBUG = True
in your
Django settings file. Change that to False
, and Django will
display a standard page generated by the handler for this status code.