伟德体育客户端|首页下载

(2002, "Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)")
Request Method:
GET
Request URL:
http://yimeitex.com/products/woollen
Django Version:
1.11.4
Exception Type:
OperationalError
Exception Value:
(2002, "Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)")
Exception Location:
/root/django_projects/venv/lib/python2.7/site-packages/MySQLdb/connections.py in __init__, line 204
Python Executable:
/root/django_projects/venv/bin/uwsgi
Python Version:
2.7.5
Python Path:
['.',
 '',
 '/root/django_projects/venv/lib64/python27.zip',
 '/root/django_projects/venv/lib64/python2.7',
 '/root/django_projects/venv/lib64/python2.7/plat-linux2',
 '/root/django_projects/venv/lib64/python2.7/lib-tk',
 '/root/django_projects/venv/lib64/python2.7/lib-old',
 '/root/django_projects/venv/lib64/python2.7/lib-dynload',
 '/usr/lib64/python2.7',
 '/usr/lib/python2.7',
 '/root/django_projects/venv/lib/python2.7/site-packages']
Server time:
星期一, 26 十月 2020 06:27:08 +0000

Traceback Switch to copy-and-paste view

  • /root/django_projects/venv/lib/python2.7/site-packages/django/core/handlers/exception.py in inner
    1.     This decorator is automatically applied to all middleware to ensure that
    2.     no middleware leaks an exception and that the next middleware in the stack
    3.     can rely on getting a response instead of an exception.
    4.     """
    5.     @wraps(get_response, assigned=available_attrs(get_response))
    6.     def inner(request):
    7.         try:
    1.             response = get_response(request)
      ...
    1.         except Exception as exc:
    2.             response = response_for_exception(request, exc)
    3.         return response
    4.     return inner
    Variable Value
    exc
    OperationalError(2002, "Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)")
    get_response
    <bound method WSGIHandler._get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x7fd659aa9cd0>>
    request
    <WSGIRequest: GET '/products/woollen'>
  • /root/django_projects/venv/lib/python2.7/site-packages/django/core/handlers/base.py in _get_response
    1.                 break
    2.         if response is None:
    3.             wrapped_callback = self.make_view_atomic(callback)
    4.             try:
    5.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)
    6.             except Exception as e:
    1.                 response = self.process_exception_by_middleware(e, request)
      ...
    1.         # Complain if the view returned None (a common error).
    2.         if response is None:
    3.             if isinstance(callback, types.FunctionType):    # FBV
    4.                 view_name = callback.__name__
    5.             else:                                           # CBV
    Variable Value
    callback
    <function products at 0x7fd65791c758>
    callback_args
    ()
    callback_kwargs
    {'code': u'woollen'}
    e
    OperationalError(2002, "Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)")
    middleware_method
    <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x7fd6578f5850>>
    request
    <WSGIRequest: GET '/products/woollen'>
    resolver
    <RegexURLResolver 'yimei_site.urls' (None:None) ^/>
    resolver_match
    ResolverMatch(func=front.views.products, args=(), kwargs={'code': u'woollen'}, url_name=products, app_names=[], namespaces=[])
    response
    None
    self
    <django.core.handlers.wsgi.WSGIHandler object at 0x7fd659aa9cd0>
    wrapped_callback
    <function products at 0x7fd65791c758>
  • /root/django_projects/venv/lib/python2.7/site-packages/django/core/handlers/base.py in _get_response
    1.             response = middleware_method(request, callback, callback_args, callback_kwargs)
    2.             if response:
    3.                 break
    4.         if response is None:
    5.             wrapped_callback = self.make_view_atomic(callback)
    6.             try:
    1.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)
      ...
    1.             except Exception as e:
    2.                 response = self.process_exception_by_middleware(e, request)
    3.         # Complain if the view returned None (a common error).
    4.         if response is None:
    5.             if isinstance(callback, types.FunctionType):    # FBV
    Variable Value
    callback
    <function products at 0x7fd65791c758>
    callback_args
    ()
    callback_kwargs
    {'code': u'woollen'}
    e
    OperationalError(2002, "Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)")
    middleware_method
    <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x7fd6578f5850>>
    request
    <WSGIRequest: GET '/products/woollen'>
    resolver
    <RegexURLResolver 'yimei_site.urls' (None:None) ^/>
    resolver_match
    ResolverMatch(func=front.views.products, args=(), kwargs={'code': u'woollen'}, url_name=products, app_names=[], namespaces=[])
    response
    None
    self
    <django.core.handlers.wsgi.WSGIHandler object at 0x7fd659aa9cd0>
    wrapped_callback
    <function products at 0x7fd65791c758>
  • ./front/views.py in products
    1.         cats = Catelog.objects.filter(parent=None).order_by('sort_order')
    2.         return render(request, 'front/catelog_home.html', {'cats': cats})
    3.     pcat = get_object_or_404(Catelog, code=code)
    4.     cats = get_list_or_404(Catelog.objects.order_by('sort_order'), parent=pcat)
    5.     return render(request, 'front/catelog.html', {'pcat': pcat, 'cats': cats})
    6. def products(request, code=''):
    1.     cat = get_object_or_404(Catelog, code=code)
      ...
    1.     pcat = cat.parent
    2.     product_list = Product.objects.filter(catelog=cat).order_by('-sort_order')
    3.     paginator = Paginator(product_list, 16)
    4.     page = request.GET.get('page')
    5.     try:
    6.         products = paginator.page(page)
    Variable Value
    code
    u'woollen'
    request
    <WSGIRequest: GET '/products/woollen'>
  • /root/django_projects/venv/lib/python2.7/site-packages/django/shortcuts.py in get_object_or_404
    1.     arguments and keyword arguments are used in the get() query.
    2.     Note: Like with get(), an MultipleObjectsReturned will be raised if more than one
    3.     object is found.
    4.     """
    5.     queryset = _get_queryset(klass)
    6.     try:
    1.         return queryset.get(*args, **kwargs)
      ...
    1.     except AttributeError:
    2.         klass__name = klass.__name__ if isinstance(klass, type) else klass.__class__.__name__
    3.         raise ValueError(
    4.             "First argument to get_object_or_404() must be a Model, Manager, "
    5.             "or QuerySet, not '%s'." % klass__name
    6.         )
    Variable Value
    args
    ()
    klass
    <class 'front.models.Catelog'>
    kwargs
    {'code': u'woollen'}
    queryset
    Error in formatting: OperationalError: (2002, "Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)")
  • /root/django_projects/venv/lib/python2.7/site-packages/django/db/models/query.py in get
    1.         """
    2.         Performs the query and returns a single object matching the given
    3.         keyword arguments.
    4.         """
    5.         clone = self.filter(*args, **kwargs)
    6.         if self.query.can_filter() and not self.query.distinct_fields:
    7.             clone = clone.order_by()
    1.         num = len(clone)
      ...
    1.         if num == 1:
    2.             return clone._result_cache[0]
    3.         if not num:
    4.             raise self.model.DoesNotExist(
    5.                 "%s matching query does not exist." %
    6.                 self.model._meta.object_name
    Variable Value
    args
    ()
    clone
    Error in formatting: OperationalError: (2002, "Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)")
    kwargs
    {'code': u'woollen'}
    self
    Error in formatting: OperationalError: (2002, "Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)")
  • /root/django_projects/venv/lib/python2.7/site-packages/django/db/models/query.py in __len__
    1.     def __repr__(self):
    2.         data = list(self[:REPR_OUTPUT_SIZE + 1])
    3.         if len(data) > REPR_OUTPUT_SIZE:
    4.             data[-1] = "...(remaining elements truncated)..."
    5.         return '<%s %r>' % (self.__class__.__name__, data)
    6.     def __len__(self):
    1.         self._fetch_all()
      ...
    1.         return len(self._result_cache)
    2.     def __iter__(self):
    3.         """
    4.         The queryset iterator protocol uses three nested iterators in the
    5.         default case:
    Variable Value
    self
    Error in formatting: OperationalError: (2002, "Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)")
  • /root/django_projects/venv/lib/python2.7/site-packages/django/db/models/query.py in _fetch_all
    1.         clone._fields = self._fields
    2.         clone.__dict__.update(kwargs)
    3.         return clone
    4.     def _fetch_all(self):
    5.         if self._result_cache is None:
    1.             self._result_cache = list(self._iterable_class(self))
      ...
    1.         if self._prefetch_related_lookups and not self._prefetch_done:
    2.             self._prefetch_related_objects()
    3.     def _next_is_sticky(self):
    4.         """
    5.         Indicates that the next filter call and the one following that should
    Variable Value
    self
    Error in formatting: OperationalError: (2002, "Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)")
  • /root/django_projects/venv/lib/python2.7/site-packages/django/db/models/query.py in __iter__
    1.     def __iter__(self):
    2.         queryset = self.queryset
    3.         db = queryset.db
    4.         compiler = queryset.query.get_compiler(using=db)
    5.         # Execute the query. This will also fill compiler.select, klass_info,
    6.         # and annotations.
    1.         results = compiler.execute_sql(chunked_fetch=self.chunked_fetch)
      ...
    1.         select, klass_info, annotation_col_map = (compiler.select, compiler.klass_info,
    2.                                                   compiler.annotation_col_map)
    3.         model_cls = klass_info['model']
    4.         select_fields = klass_info['select_fields']
    5.         model_fields_start, model_fields_end = select_fields[0], select_fields[-1] + 1
    6.         init_list = [f[0].target.attname
    Variable Value
    compiler
    <django.db.backends.mysql.compiler.SQLCompiler object at 0x7fd656ecad90>
    db
    'default'
    queryset
    Error in formatting: OperationalError: (2002, "Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)")
    self
    <django.db.models.query.ModelIterable object at 0x7fd656eca2d0>
  • /root/django_projects/venv/lib/python2.7/site-packages/django/db/models/sql/compiler.py in execute_sql
    1.         subclasses such as InsertQuery). It's possible, however, that no query
    2.         is needed, as the filters describe an empty set. In that case, None is
    3.         returned, to avoid any unnecessary database interaction.
    4.         """
    5.         if not result_type:
    6.             result_type = NO_RESULTS
    7.         try:
    1.             sql, params = self.as_sql()
      ...
    1.             if not sql:
    2.                 raise EmptyResultSet
    3.         except EmptyResultSet:
    4.             if result_type == MULTI:
    5.                 return iter([])
    6.             else:
    Variable Value
    chunked_fetch
    False
    result_type
    'multi'
    self
    <django.db.backends.mysql.compiler.SQLCompiler object at 0x7fd656ecad90>
  • /root/django_projects/venv/lib/python2.7/site-packages/django/db/models/sql/compiler.py in as_sql
    1.                     raise DatabaseError('{} not supported on this database backend.'.format(combinator))
    2.                 result, params = self.get_combinator_sql(combinator, self.query.combinator_all)
    3.             else:
    4.                 distinct_fields = self.get_distinct()
    5.                 # This must come after 'select', 'ordering', and 'distinct'
    6.                 # (see docstring of get_from_clause() for details).
    7.                 from_, f_params = self.get_from_clause()
    1.                 where, w_params = self.compile(self.where) if self.where is not None else ("", [])
      ...
    1.                 having, h_params = self.compile(self.having) if self.having is not None else ("", [])
    2.                 result = ['SELECT']
    3.                 params = []
    4.                 if self.query.distinct:
    5.                     result.append(self.connection.ops.distinct_sql(distinct_fields))
    Variable Value
    combinator
    None
    distinct_fields
    []
    extra_select
    []
    f_params
    []
    features
    <django.db.backends.mysql.features.DatabaseFeatures object at 0x7fd657a5a810>
    for_update_part
    None
    from_
    [u'`front_catelog`']
    group_by
    []
    order_by
    []
    refcounts_before
    {u'front_catelog': 1}
    self
    <django.db.backends.mysql.compiler.SQLCompiler object at 0x7fd656ecad90>
    with_col_aliases
    False
    with_limits
    True
  • /root/django_projects/venv/lib/python2.7/site-packages/django/db/models/sql/compiler.py in compile
    1.         return r
    2.     def compile(self, node, select_format=False):
    3.         vendor_impl = getattr(node, 'as_' + self.connection.vendor, None)
    4.         if vendor_impl:
    5.             sql, params = vendor_impl(self, self.connection)
    6.         else:
    1.             sql, params = node.as_sql(self, self.connection)
      ...
    1.         if select_format is FORCE or (select_format and not self.query.subquery):
    2.             return node.output_field.select_format(self, sql, params)
    3.         return sql, params
    4.     def get_combinator_sql(self, combinator, all):
    5.         features = self.connection.features
    Variable Value
    node
    <WhereNode: (AND: <django.db.models.lookups.Exact object at 0x7fd656eca910>)>
    select_format
    False
    self
    <django.db.backends.mysql.compiler.SQLCompiler object at 0x7fd656ecad90>
    vendor_impl
    None
  • /root/django_projects/venv/lib/python2.7/site-packages/django/db/models/sql/where.py in as_sql
    1.         if self.connector == AND:
    2.             full_needed, empty_needed = len(self.children), 1
    3.         else:
    4.             full_needed, empty_needed = 1, len(self.children)
    5.         for child in self.children:
    6.             try:
    1.                 sql, params = compiler.compile(child)
      ...
    1.             except EmptyResultSet:
    2.                 empty_needed -= 1
    3.             else:
    4.                 if sql:
    5.                     result.append(sql)
    6.                     result_params.extend(params)
    Variable Value
    child
    <django.db.models.lookups.Exact object at 0x7fd656eca910>
    compiler
    <django.db.backends.mysql.compiler.SQLCompiler object at 0x7fd656ecad90>
    connection
    <django.db.backends.mysql.base.DatabaseWrapper object at 0x7fd657a5a750>
    empty_needed
    1
    full_needed
    1
    result
    []
    result_params
    []
    self
    <WhereNode: (AND: <django.db.models.lookups.Exact object at 0x7fd656eca910>)>
  • /root/django_projects/venv/lib/python2.7/site-packages/django/db/models/sql/compiler.py in compile
    1.         return r
    2.     def compile(self, node, select_format=False):
    3.         vendor_impl = getattr(node, 'as_' + self.connection.vendor, None)
    4.         if vendor_impl:
    5.             sql, params = vendor_impl(self, self.connection)
    6.         else:
    1.             sql, params = node.as_sql(self, self.connection)
      ...
    1.         if select_format is FORCE or (select_format and not self.query.subquery):
    2.             return node.output_field.select_format(self, sql, params)
    3.         return sql, params
    4.     def get_combinator_sql(self, combinator, all):
    5.         features = self.connection.features
    Variable Value
    node
    <django.db.models.lookups.Exact object at 0x7fd656eca910>
    select_format
    False
    self
    <django.db.backends.mysql.compiler.SQLCompiler object at 0x7fd656ecad90>
    vendor_impl
    None
  • /root/django_projects/venv/lib/python2.7/site-packages/django/db/models/lookups.py in as_sql
    1.         db_type = self.lhs.output_field.db_type(connection=connection)
    2.         lhs_sql = connection.ops.field_cast_sql(
    3.             db_type, field_internal_type) % lhs_sql
    4.         lhs_sql = connection.ops.lookup_cast(self.lookup_name, field_internal_type) % lhs_sql
    5.         return lhs_sql, list(params)
    6.     def as_sql(self, compiler, connection):
    1.         lhs_sql, params = self.process_lhs(compiler, connection)
      ...
    1.         rhs_sql, rhs_params = self.process_rhs(compiler, connection)
    2.         params.extend(rhs_params)
    3.         rhs_sql = self.get_rhs_op(connection, rhs_sql)
    4.         return '%s %s' % (lhs_sql, rhs_sql), params
    5.     def get_rhs_op(self, connection, rhs):
    Variable Value
    compiler
    <django.db.backends.mysql.compiler.SQLCompiler object at 0x7fd656ecad90>
    connection
    <django.db.backends.mysql.base.DatabaseWrapper object at 0x7fd657a5a750>
    self
    <django.db.models.lookups.Exact object at 0x7fd656eca910>
  • /root/django_projects/venv/lib/python2.7/site-packages/django/db/models/lookups.py in process_lhs
    1. class BuiltinLookup(Lookup):
    2.     def process_lhs(self, compiler, connection, lhs=None):
    3.         lhs_sql, params = super(BuiltinLookup, self).process_lhs(
    4.             compiler, connection, lhs)
    5.         field_internal_type = self.lhs.output_field.get_internal_type()
    1.         db_type = self.lhs.output_field.db_type(connection=connection)
      ...
    1.         lhs_sql = connection.ops.field_cast_sql(
    2.             db_type, field_internal_type) % lhs_sql
    3.         lhs_sql = connection.ops.lookup_cast(self.lookup_name, field_internal_type) % lhs_sql
    4.         return lhs_sql, list(params)
    5.     def as_sql(self, compiler, connection):
    Variable Value
    compiler
    <django.db.backends.mysql.compiler.SQLCompiler object at 0x7fd656ecad90>
    connection
    <django.db.backends.mysql.base.DatabaseWrapper object at 0x7fd657a5a750>
    field_internal_type
    u'CharField'
    lhs
    None
    lhs_sql
    u'`front_catelog`.`code`'
    params
    []
    self
    <django.db.models.lookups.Exact object at 0x7fd656eca910>
  • /root/django_projects/venv/lib/python2.7/site-packages/django/db/models/fields/__init__.py in db_type
    1.         # But the limitation of the get_internal_type() / data_types approach
    2.         # is that it cannot handle database column types that aren't already
    3.         # mapped to one of the built-in Django field types. In this case, you
    4.         # can implement db_type() instead of get_internal_type() to specify
    5.         # exactly which wacky database column type you want to use.
    6.         data = DictWrapper(self.__dict__, connection.ops.quote_name, "qn_")
    7.         try:
    1.             return connection.data_types[self.get_internal_type()] % data
      ...
    1.         except KeyError:
    2.             return None
    3.     def rel_db_type(self, connection):
    4.         """
    5.         Return the data type that a related field pointing to this field should
    Variable Value
    connection
    <django.db.backends.mysql.base.DatabaseWrapper object at 0x7fd657a5a750>
    data
    {'_error_messages': None,
     '_unique': True,
     '_validators': [],
     '_verbose_name': None,
     'attname': 'code',
     'auto_created': False,
     'blank': False,
     'cached_col': Col(front_catelog, front.Catelog.code),
     'choices': [],
     'column': 'code',
     'concrete': True,
     'creation_counter': 1,
     'db_column': None,
     'db_index': False,
     'db_tablespace': u'',
     'default': <class django.db.models.fields.NOT_PROVIDED at 0x7fd6590caae0>,
     'editable': True,
     'error_messages': {u'blank': u'\u6b64\u5b57\u6bb5\u4e0d\u80fd\u4e3a\u7a7a\u3002',
                        u'invalid_choice': u'\u503c %(value)r \u4e0d\u662f\u6709\u6548\u9009\u9879\u3002',
                        u'null': u'\u8fd9\u4e2a\u503c\u4e0d\u80fd\u4e3a null\u3002',
                        u'unique': u'\u5177\u6709 %(field_label)s \u7684 %(model_name)s \u5df2\u5b58\u5728\u3002',
                        u'unique_for_date': u'%(field_label)s \u5fc5\u987b\u5728 %(date_field_label)s \u5b57\u6bb5\u67e5\u627e\u7c7b\u578b\u4e3a %(lookup_type)s \u4e2d\u552f\u4e00\u3002'},
     'help_text': u'',
     'is_relation': False,
     'max_length': 100,
     'model': <class 'front.models.Catelog'>,
     'name': 'code',
     'null': False,
     'primary_key': False,
     'remote_field': None,
     'serialize': True,
     'unique_for_date': None,
     'unique_for_month': None,
     'unique_for_year': None,
     'validators': [<django.core.validators.MaxLengthValidator object at 0x7fd65870bfd0>],
     'verbose_name': u'code'}
    self
    <django.db.models.fields.CharField: code>
  • /root/django_projects/venv/lib/python2.7/site-packages/django/utils/functional.py in __get__
    1.         self.func = func
    2.         self.__doc__ = getattr(func, '__doc__')
    3.         self.name = name or func.__name__
    4.     def __get__(self, instance, cls=None):
    5.         if instance is None:
    6.             return self
    1.         res = instance.__dict__[self.name] = self.func(instance)
      ...
    1.         return res
    2. class Promise(object):
    3.     """
    4.     This is just a base class for the proxy class created in
    Variable Value
    cls
    <class 'django.db.backends.mysql.base.DatabaseWrapper'>
    instance
    <django.db.backends.mysql.base.DatabaseWrapper object at 0x7fd657a5a750>
    self
    <django.utils.functional.cached_property object at 0x7fd657a5a650>
  • /root/django_projects/venv/lib/python2.7/site-packages/django/db/backends/mysql/base.py in data_types
    1.         'TextField': 'longtext',
    2.         'TimeField': 'time',
    3.         'UUIDField': 'char(32)',
    4.     }
    5.     @cached_property
    6.     def data_types(self):
    1.         if self.features.supports_microsecond_precision:
      ...
    1.             return dict(self._data_types, DateTimeField='datetime(6)', TimeField='time(6)')
    2.         else:
    3.             return self._data_types
    4.     operators = {
    5.         'exact': '= %s',
    Variable Value
    self
    <django.db.backends.mysql.base.DatabaseWrapper object at 0x7fd657a5a750>
  • /root/django_projects/venv/lib/python2.7/site-packages/django/utils/functional.py in __get__
    1.         self.func = func
    2.         self.__doc__ = getattr(func, '__doc__')
    3.         self.name = name or func.__name__
    4.     def __get__(self, instance, cls=None):
    5.         if instance is None:
    6.             return self
    1.         res = instance.__dict__[self.name] = self.func(instance)
      ...
    1.         return res
    2. class Promise(object):
    3.     """
    4.     This is just a base class for the proxy class created in
    Variable Value
    cls
    <class 'django.db.backends.mysql.features.DatabaseFeatures'>
    instance
    <django.db.backends.mysql.features.DatabaseFeatures object at 0x7fd657a5a810>
    self
    <django.utils.functional.cached_property object at 0x7fd6586ce3d0>
  • /root/django_projects/venv/lib/python2.7/site-packages/django/db/backends/mysql/features.py in supports_microsecond_precision
    1.         "Confirm support for introspected foreign keys"
    2.         return self._mysql_storage_engine != 'MyISAM'
    3.     @cached_property
    4.     def supports_microsecond_precision(self):
    5.         # See https://github.com/farcepest/MySQLdb1/issues/24 for the reason
    6.         # about requiring MySQLdb 1.2.5
    1.         return self.connection.mysql_version >= (5, 6, 4) and Database.version_info >= (1, 2, 5)
      ...
    1.     @cached_property
    2.     def has_zoneinfo_database(self):
    3.         # Test if the time zone definitions are installed.
    4.         with self.connection.cursor() as cursor:
    5.             cursor.execute("SELECT 1 FROM mysql.time_zone LIMIT 1")
    Variable Value
    self
    <django.db.backends.mysql.features.DatabaseFeatures object at 0x7fd657a5a810>
  • /root/django_projects/venv/lib/python2.7/site-packages/django/utils/functional.py in __get__
    1.         self.func = func
    2.         self.__doc__ = getattr(func, '__doc__')
    3.         self.name = name or func.__name__
    4.     def __get__(self, instance, cls=None):
    5.         if instance is None:
    6.             return self
    1.         res = instance.__dict__[self.name] = self.func(instance)
      ...
    1.         return res
    2. class Promise(object):
    3.     """
    4.     This is just a base class for the proxy class created in
    Variable Value
    cls
    <class 'django.db.backends.mysql.base.DatabaseWrapper'>
    instance
    <django.db.backends.mysql.base.DatabaseWrapper object at 0x7fd657a5a750>
    self
    <django.utils.functional.cached_property object at 0x7fd657a5a710>
  • /root/django_projects/venv/lib/python2.7/site-packages/django/db/backends/mysql/base.py in mysql_version
    1.         except Database.Error:
    2.             return False
    3.         else:
    4.             return True
    5.     @cached_property
    6.     def mysql_version(self):
    1.         with self.temporary_connection() as cursor:
      ...
    1.             cursor.execute('SELECT VERSION()')
    2.             server_info = cursor.fetchone()[0]
    3.         match = server_version_re.match(server_info)
    4.         if not match:
    5.             raise Exception('Unable to determine MySQL version from version string %r' % server_info)
    6.         return tuple(int(x) for x in match.groups())
    Variable Value
    self
    <django.db.backends.mysql.base.DatabaseWrapper object at 0x7fd657a5a750>
  • /usr/lib64/python2.7/contextlib.py in __enter__
    1.     """Helper for @contextmanager decorator."""
    2.     def __init__(self, gen):
    3.         self.gen = gen
    4.     def __enter__(self):
    5.         try:
    1.             return self.gen.next()
      ...
    1.         except StopIteration:
    2.             raise RuntimeError("generator didn't yield")
    3.     def __exit__(self, type, value, traceback):
    4.         if type is None:
    5.             try:
    Variable Value
    self
    <contextlib.GeneratorContextManager object at 0x7fd656eca290>
  • /root/django_projects/venv/lib/python2.7/site-packages/django/db/backends/base/base.py in temporary_connection
    1.         Context manager that ensures that a connection is established, and
    2.         if it opened one, closes it to avoid leaving a dangling connection.
    3.         This is useful for operations outside of the request-response cycle.
    4.         Provides a cursor: with self.temporary_connection() as cursor: ...
    5.         """
    6.         must_close = self.connection is None
    1.         cursor = self.cursor()
      ...
    1.         try:
    2.             yield cursor
    3.         finally:
    4.             cursor.close()
    5.             if must_close:
    6.                 self.close()
    Variable Value
    must_close
    True
    self
    <django.db.backends.mysql.base.DatabaseWrapper object at 0x7fd657a5a750>
  • /root/django_projects/venv/lib/python2.7/site-packages/django/db/backends/base/base.py in cursor
    1.     # ##### Generic wrappers for PEP-249 connection methods #####
    2.     def cursor(self):
    3.         """
    4.         Creates a cursor, opening a connection if necessary.
    5.         """
    1.         return self._cursor()
      ...
    1.     def commit(self):
    2.         """
    3.         Commits a transaction and resets the dirty flag.
    4.         """
    5.         self.validate_thread_sharing()
    Variable Value
    self
    <django.db.backends.mysql.base.DatabaseWrapper object at 0x7fd657a5a750>
  • /root/django_projects/venv/lib/python2.7/site-packages/django/db/backends/base/base.py in _cursor
    1.         if self.queries_logged:
    2.             wrapped_cursor = self.make_debug_cursor(cursor)
    3.         else:
    4.             wrapped_cursor = self.make_cursor(cursor)
    5.         return wrapped_cursor
    6.     def _cursor(self, name=None):
    1.         self.ensure_connection()
      ...
    1.         with self.wrap_database_errors:
    2.             return self._prepare_cursor(self.create_cursor(name))
    3.     def _commit(self):
    4.         if self.connection is not None:
    5.             with self.wrap_database_errors:
    Variable Value
    name
    None
    self
    <django.db.backends.mysql.base.DatabaseWrapper object at 0x7fd657a5a750>
  • /root/django_projects/venv/lib/python2.7/site-packages/django/db/backends/base/base.py in ensure_connection
    1.     def ensure_connection(self):
    2.         """
    3.         Guarantees that a connection to the database is established.
    4.         """
    5.         if self.connection is None:
    6.             with self.wrap_database_errors:
    1.                 self.connect()
      ...
    1.     # ##### Backend-specific wrappers for PEP-249 connection methods #####
    2.     def _prepare_cursor(self, cursor):
    3.         """
    4.         Validate the connection is usable and perform database cursor wrapping.
    Variable Value
    self
    <django.db.backends.mysql.base.DatabaseWrapper object at 0x7fd657a5a750>
  • /root/django_projects/venv/lib/python2.7/site-packages/django/db/utils.py in __exit__
    1.                 dj_exc_value.__cause__ = exc_value
    2.                 if not hasattr(exc_value, '__traceback__'):
    3.                     exc_value.__traceback__ = traceback
    4.                 # Only set the 'errors_occurred' flag for errors that may make
    5.                 # the connection unusable.
    6.                 if dj_exc_type not in (DataError, IntegrityError):
    7.                     self.wrapper.errors_occurred = True
    1.                 six.reraise(dj_exc_type, dj_exc_value, traceback)
      ...
    1.     def __call__(self, func):
    2.         # Note that we are intentionally not using @wraps here for performance
    3.         # reasons. Refs #21109.
    4.         def inner(*args, **kwargs):
    5.             with self:
    Variable Value
    db_exc_type
    <class '_mysql_exceptions.OperationalError'>
    dj_exc_type
    <class 'django.db.utils.OperationalError'>
    dj_exc_value
    OperationalError(2002, "Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)")
    exc_type
    <class '_mysql_exceptions.OperationalError'>
    exc_value
    OperationalError(2002, "Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)")
    self
    <django.db.utils.DatabaseErrorWrapper object at 0x7fd657850b10>
    traceback
    <traceback object at 0x7fd656f02a70>
  • /root/django_projects/venv/lib/python2.7/site-packages/django/db/backends/base/base.py in ensure_connection
    1.     def ensure_connection(self):
    2.         """
    3.         Guarantees that a connection to the database is established.
    4.         """
    5.         if self.connection is None:
    6.             with self.wrap_database_errors:
    1.                 self.connect()
      ...
    1.     # ##### Backend-specific wrappers for PEP-249 connection methods #####
    2.     def _prepare_cursor(self, cursor):
    3.         """
    4.         Validate the connection is usable and perform database cursor wrapping.
    Variable Value
    self
    <django.db.backends.mysql.base.DatabaseWrapper object at 0x7fd657a5a750>
  • /root/django_projects/venv/lib/python2.7/site-packages/django/db/backends/base/base.py in connect
    1.         # Reset parameters defining when to close the connection
    2.         max_age = self.settings_dict['CONN_MAX_AGE']
    3.         self.close_at = None if max_age is None else time.time() + max_age
    4.         self.closed_in_transaction = False
    5.         self.errors_occurred = False
    6.         # Establish the connection
    7.         conn_params = self.get_connection_params()
    1.         self.connection = self.get_new_connection(conn_params)
      ...
    1.         self.set_autocommit(self.settings_dict['AUTOCOMMIT'])
    2.         self.init_connection_state()
    3.         connection_created.send(sender=self.__class__, connection=self)
    4.         self.run_on_commit = []
    Variable Value
    conn_params
    {u'charset': u'utf8',
     u'client_flag': 2,
     u'conv': {0: <function typecast_decimal at 0x7fd659abfcf8>,
               1: <type 'int'>,
               2: <type 'int'>,
               3: <type 'long'>,
               4: <type 'float'>,
               5: <type 'float'>,
               7: <function mysql_timestamp_converter at 0x7fd6586c00c8>,
               8: <type 'long'>,
               9: <type 'int'>,
               10: <function Date_or_None at 0x7fd6586b5ed8>,
               11: <function typecast_time at 0x7fd659abfc08>,
               12: <function DateTime_or_None at 0x7fd6586b5d70>,
               13: <type 'int'>,
               15: [(128, <type 'str'>)],
               246: <function typecast_decimal at 0x7fd659abfcf8>,
               248: <function Str2Set at 0x7fd6586c06e0>,
               249: [(128, <type 'str'>)],
               250: [(128, <type 'str'>)],
               251: [(128, <type 'str'>)],
               252: [(128, <type 'str'>)],
               253: [(128, <type 'str'>)],
               254: [(128, <type 'str'>)],
               <type 'array.array'>: <function array2Str at 0x7fd6586c0aa0>,
               <type 'datetime.timedelta'>: <function DateTimeDelta2literal at 0x7fd6586c0050>,
               <type 'datetime.datetime'>: <function adapt_datetime_warn_on_aware_datetime at 0x7fd657a538c0>,
               <type 'datetime.date'>: <function Thing2Literal at 0x7fd6586c09b0>,
               <type 'bool'>: <function Bool2Str at 0x7fd6586c05f0>,
               <type 'float'>: <function Float2Str at 0x7fd6586c08c0>,
               <type 'int'>: <function Thing2Str at 0x7fd6586c07d0>,
               <type 'list'>: <function quote_tuple at 0x7fd6586c0b18>,
               <type 'long'>: <function Thing2Str at 0x7fd6586c07d0>,
               <type 'dict'>: <built-in function escape_dict>,
               <type 'NoneType'>: <function None2NULL at 0x7fd6586c0938>,
               <type 'set'>: <function Set2Str at 0x7fd6586c0758>,
               <type 'str'>: <function Thing2Literal at 0x7fd6586c09b0>,
               <type 'tuple'>: <function quote_tuple at 0x7fd6586c0b18>,
               <type 'unicode'>: <function Unicode2Str at 0x7fd6586c0848>},
     u'db': 'yimei_site',
     u'host': 'localhost',
     u'passwd': '123456',
     u'use_unicode': True,
     u'user': 'root'}
    max_age
    0
    self
    <django.db.backends.mysql.base.DatabaseWrapper object at 0x7fd657a5a750>
  • /root/django_projects/venv/lib/python2.7/site-packages/django/db/backends/mysql/base.py in get_new_connection
    1.             # levels will be used, e.g. "set tx_isolation='repeatable-read'".
    2.             isolation_level = isolation_level.replace(' ', '-')
    3.         self.isolation_level = isolation_level
    4.         kwargs.update(options)
    5.         return kwargs
    6.     def get_new_connection(self, conn_params):
    1.         conn = Database.connect(**conn_params)
      ...
    1.         conn.encoders[SafeText] = conn.encoders[six.text_type]
    2.         conn.encoders[SafeBytes] = conn.encoders[bytes]
    3.         return conn
    4.     def init_connection_state(self):
    5.         assignments = []
    Variable Value
    conn_params
    {u'charset': u'utf8',
     u'client_flag': 2,
     u'conv': {0: <function typecast_decimal at 0x7fd659abfcf8>,
               1: <type 'int'>,
               2: <type 'int'>,
               3: <type 'long'>,
               4: <type 'float'>,
               5: <type 'float'>,
               7: <function mysql_timestamp_converter at 0x7fd6586c00c8>,
               8: <type 'long'>,
               9: <type 'int'>,
               10: <function Date_or_None at 0x7fd6586b5ed8>,
               11: <function typecast_time at 0x7fd659abfc08>,
               12: <function DateTime_or_None at 0x7fd6586b5d70>,
               13: <type 'int'>,
               15: [(128, <type 'str'>)],
               246: <function typecast_decimal at 0x7fd659abfcf8>,
               248: <function Str2Set at 0x7fd6586c06e0>,
               249: [(128, <type 'str'>)],
               250: [(128, <type 'str'>)],
               251: [(128, <type 'str'>)],
               252: [(128, <type 'str'>)],
               253: [(128, <type 'str'>)],
               254: [(128, <type 'str'>)],
               <type 'array.array'>: <function array2Str at 0x7fd6586c0aa0>,
               <type 'datetime.timedelta'>: <function DateTimeDelta2literal at 0x7fd6586c0050>,
               <type 'datetime.datetime'>: <function adapt_datetime_warn_on_aware_datetime at 0x7fd657a538c0>,
               <type 'datetime.date'>: <function Thing2Literal at 0x7fd6586c09b0>,
               <type 'bool'>: <function Bool2Str at 0x7fd6586c05f0>,
               <type 'float'>: <function Float2Str at 0x7fd6586c08c0>,
               <type 'int'>: <function Thing2Str at 0x7fd6586c07d0>,
               <type 'list'>: <function quote_tuple at 0x7fd6586c0b18>,
               <type 'long'>: <function Thing2Str at 0x7fd6586c07d0>,
               <type 'dict'>: <built-in function escape_dict>,
               <type 'NoneType'>: <function None2NULL at 0x7fd6586c0938>,
               <type 'set'>: <function Set2Str at 0x7fd6586c0758>,
               <type 'str'>: <function Thing2Literal at 0x7fd6586c09b0>,
               <type 'tuple'>: <function quote_tuple at 0x7fd6586c0b18>,
               <type 'unicode'>: <function Unicode2Str at 0x7fd6586c0848>},
     u'db': 'yimei_site',
     u'host': 'localhost',
     u'passwd': '123456',
     u'use_unicode': True,
     u'user': 'root'}
    self
    <django.db.backends.mysql.base.DatabaseWrapper object at 0x7fd657a5a750>
  • /root/django_projects/venv/lib/python2.7/site-packages/MySQLdb/__init__.py in Connect
    1. else:
    2.     def Binary(x):
    3.         return bytes(x)
    4. def Connect(*args, **kwargs):
    5.     """Factory function for connections.Connection."""
    6.     from MySQLdb.connections import Connection
    1.     return Connection(*args, **kwargs)
      ...
    1. connect = Connection = Connect
    2. __all__ = [ 'BINARY', 'Binary', 'Connect', 'Connection', 'DATE',
    3.     'Date', 'Time', 'Timestamp', 'DateFromTicks', 'TimeFromTicks',
    4.     'TimestampFromTicks', 'DataError', 'DatabaseError', 'Error',
    Variable Value
    Connection
    <class 'MySQLdb.connections.Connection'>
    args
    ()
    kwargs
    {u'charset': u'utf8',
     u'client_flag': 2,
     u'conv': {0: <function typecast_decimal at 0x7fd659abfcf8>,
               1: <type 'int'>,
               2: <type 'int'>,
               3: <type 'long'>,
               4: <type 'float'>,
               5: <type 'float'>,
               7: <function mysql_timestamp_converter at 0x7fd6586c00c8>,
               8: <type 'long'>,
               9: <type 'int'>,
               10: <function Date_or_None at 0x7fd6586b5ed8>,
               11: <function typecast_time at 0x7fd659abfc08>,
               12: <function DateTime_or_None at 0x7fd6586b5d70>,
               13: <type 'int'>,
               15: [(128, <type 'str'>)],
               246: <function typecast_decimal at 0x7fd659abfcf8>,
               248: <function Str2Set at 0x7fd6586c06e0>,
               249: [(128, <type 'str'>)],
               250: [(128, <type 'str'>)],
               251: [(128, <type 'str'>)],
               252: [(128, <type 'str'>)],
               253: [(128, <type 'str'>)],
               254: [(128, <type 'str'>)],
               <type 'array.array'>: <function array2Str at 0x7fd6586c0aa0>,
               <type 'datetime.timedelta'>: <function DateTimeDelta2literal at 0x7fd6586c0050>,
               <type 'datetime.datetime'>: <function adapt_datetime_warn_on_aware_datetime at 0x7fd657a538c0>,
               <type 'datetime.date'>: <function Thing2Literal at 0x7fd6586c09b0>,
               <type 'bool'>: <function Bool2Str at 0x7fd6586c05f0>,
               <type 'float'>: <function Float2Str at 0x7fd6586c08c0>,
               <type 'int'>: <function Thing2Str at 0x7fd6586c07d0>,
               <type 'list'>: <function quote_tuple at 0x7fd6586c0b18>,
               <type 'long'>: <function Thing2Str at 0x7fd6586c07d0>,
               <type 'dict'>: <built-in function escape_dict>,
               <type 'NoneType'>: <function None2NULL at 0x7fd6586c0938>,
               <type 'set'>: <function Set2Str at 0x7fd6586c0758>,
               <type 'str'>: <function Thing2Literal at 0x7fd6586c09b0>,
               <type 'tuple'>: <function quote_tuple at 0x7fd6586c0b18>,
               <type 'unicode'>: <function Unicode2Str at 0x7fd6586c0848>},
     u'db': 'yimei_site',
     u'host': 'localhost',
     u'passwd': '123456',
     u'use_unicode': True,
     u'user': 'root'}
  • /root/django_projects/venv/lib/python2.7/site-packages/MySQLdb/connections.py in __init__
    1.         kwargs2['client_flag'] = client_flag
    2.         # PEP-249 requires autocommit to be initially off
    3.         autocommit = kwargs2.pop('autocommit', False)
    4.         self.waiter = kwargs2.pop('waiter', None)
    1.         super(Connection, self).__init__(*args, **kwargs2)
      ...
    1.         self.cursorclass = cursorclass
    2.         self.encoders = dict([ (k, v) for k, v in conv.items()
    3.                                if type(k) is not int ])
    4.         self._server_version = tuple([ numeric_part(n) for n in self.get_server_info().split('.')[:2] ])
    Variable Value
    CLIENT
    <module 'MySQLdb.constants.CLIENT' from '/root/django_projects/venv/lib/python2.7/site-packages/MySQLdb/constants/CLIENT.pyc'>
    FIELD_TYPE
    <module 'MySQLdb.constants.FIELD_TYPE' from '/root/django_projects/venv/lib/python2.7/site-packages/MySQLdb/constants/FIELD_TYPE.pyc'>
    args
    ()
    autocommit
    False
    binary_prefix
    False
    charset
    u'utf8'
    client_flag
    196610
    client_version
    (5, 5)
    conv
    {0: <function typecast_decimal at 0x7fd659abfcf8>,
     1: <type 'int'>,
     2: <type 'int'>,
     3: <type 'long'>,
     4: <type 'float'>,
     5: <type 'float'>,
     7: <function mysql_timestamp_converter at 0x7fd6586c00c8>,
     8: <type 'long'>,
     9: <type 'int'>,
     10: <function Date_or_None at 0x7fd6586b5ed8>,
     11: <function typecast_time at 0x7fd659abfc08>,
     12: <function DateTime_or_None at 0x7fd6586b5d70>,
     13: <type 'int'>,
     15: [(128, <type 'str'>)],
     246: <function typecast_decimal at 0x7fd659abfcf8>,
     248: <function Str2Set at 0x7fd6586c06e0>,
     249: [(128, <type 'str'>)],
     250: [(128, <type 'str'>)],
     251: [(128, <type 'str'>)],
     252: [(128, <type 'str'>)],
     253: [(128, <type 'str'>)],
     254: [(128, <type 'str'>)],
     <type 'array.array'>: <function array2Str at 0x7fd6586c0aa0>,
     <type 'datetime.timedelta'>: <function DateTimeDelta2literal at 0x7fd6586c0050>,
     <type 'datetime.datetime'>: <function adapt_datetime_warn_on_aware_datetime at 0x7fd657a538c0>,
     <type 'datetime.date'>: <function Thing2Literal at 0x7fd6586c09b0>,
     <type 'bool'>: <function Bool2Str at 0x7fd6586c05f0>,
     <type 'float'>: <function Float2Str at 0x7fd6586c08c0>,
     <type 'int'>: <function Thing2Str at 0x7fd6586c07d0>,
     <type 'list'>: <function quote_tuple at 0x7fd6586c0b18>,
     <type 'long'>: <function Thing2Str at 0x7fd6586c07d0>,
     <type 'dict'>: <built-in function escape_dict>,
     <type 'NoneType'>: <function None2NULL at 0x7fd6586c0938>,
     <type 'set'>: <function Set2Str at 0x7fd6586c0758>,
     <type 'str'>: <function Thing2Literal at 0x7fd6586c09b0>,
     <type 'tuple'>: <function quote_tuple at 0x7fd6586c0b18>,
     <type 'unicode'>: <function Unicode2Str at 0x7fd6586c0848>}
    conv2
    {0: <function typecast_decimal at 0x7fd659abfcf8>,
     1: <type 'int'>,
     2: <type 'int'>,
     3: <type 'long'>,
     4: <type 'float'>,
     5: <type 'float'>,
     7: <function mysql_timestamp_converter at 0x7fd6586c00c8>,
     8: <type 'long'>,
     9: <type 'int'>,
     10: <function Date_or_None at 0x7fd6586b5ed8>,
     11: <function typecast_time at 0x7fd659abfc08>,
     12: <function DateTime_or_None at 0x7fd6586b5d70>,
     13: <type 'int'>,
     15: [(128, <type 'str'>)],
     246: <function typecast_decimal at 0x7fd659abfcf8>,
     248: <function Str2Set at 0x7fd6586c06e0>,
     249: [(128, <type 'str'>)],
     250: [(128, <type 'str'>)],
     251: [(128, <type 'str'>)],
     252: [(128, <type 'str'>)],
     253: [(128, <type 'str'>)],
     254: [(128, <type 'str'>)],
     <type 'array.array'>: <function array2Str at 0x7fd6586c0aa0>,
     <type 'datetime.timedelta'>: <function DateTimeDelta2literal at 0x7fd6586c0050>,
     <type 'datetime.datetime'>: <function adapt_datetime_warn_on_aware_datetime at 0x7fd657a538c0>,
     <type 'datetime.date'>: <function Thing2Literal at 0x7fd6586c09b0>,
     <type 'bool'>: <function Bool2Str at 0x7fd6586c05f0>,
     <type 'float'>: <function Float2Str at 0x7fd6586c08c0>,
     <type 'int'>: <function Thing2Str at 0x7fd6586c07d0>,
     <type 'list'>: <function quote_tuple at 0x7fd6586c0b18>,
     <type 'long'>: <function Thing2Str at 0x7fd6586c07d0>,
     <type 'dict'>: <built-in function escape_dict>,
     <type 'NoneType'>: <function None2NULL at 0x7fd6586c0938>,
     <type 'set'>: <function Set2Str at 0x7fd6586c0758>,
     <type 'str'>: <function Thing2Literal at 0x7fd6586c09b0>,
     <type 'tuple'>: <function quote_tuple at 0x7fd6586c0b18>,
     <type 'unicode'>: <function Unicode2Str at 0x7fd6586c0848>}
    conversions
    {0: <class 'decimal.Decimal'>,
     1: <type 'int'>,
     2: <type 'int'>,
     3: <type 'long'>,
     4: <type 'float'>,
     5: <type 'float'>,
     7: <function mysql_timestamp_converter at 0x7fd6586c00c8>,
     8: <type 'long'>,
     9: <type 'int'>,
     10: <function Date_or_None at 0x7fd6586b5ed8>,
     11: <function TimeDelta_or_None at 0x7fd6586b5de8>,
     12: <function DateTime_or_None at 0x7fd6586b5d70>,
     13: <type 'int'>,
     15: [(128, <type 'str'>)],
     246: <class 'decimal.Decimal'>,
     248: <function Str2Set at 0x7fd6586c06e0>,
     249: [(128, <type 'str'>)],
     250: [(128, <type 'str'>)],
     251: [(128, <type 'str'>)],
     252: [(128, <type 'str'>)],
     253: [(128, <type 'str'>)],
     254: [(128, <type 'str'>)],
     <type 'array.array'>: <function array2Str at 0x7fd6586c0aa0>,
     <type 'datetime.timedelta'>: <function DateTimeDelta2literal at 0x7fd6586c0050>,
     <type 'datetime.datetime'>: <function DateTime2literal at 0x7fd6586b5f50>,
     <type 'datetime.date'>: <function Thing2Literal at 0x7fd6586c09b0>,
     <type 'bool'>: <function Bool2Str at 0x7fd6586c05f0>,
     <type 'float'>: <function Float2Str at 0x7fd6586c08c0>,
     <type 'int'>: <function Thing2Str at 0x7fd6586c07d0>,
     <type 'list'>: <function quote_tuple at 0x7fd6586c0b18>,
     <type 'long'>: <function Thing2Str at 0x7fd6586c07d0>,
     <type 'dict'>: <built-in function escape_dict>,
     <type 'NoneType'>: <function None2NULL at 0x7fd6586c0938>,
     <type 'set'>: <function Set2Str at 0x7fd6586c0758>,
     <type 'str'>: <function Thing2Literal at 0x7fd6586c09b0>,
     <type 'tuple'>: <function quote_tuple at 0x7fd6586c0b18>,
     <type 'unicode'>: <function Unicode2Str at 0x7fd6586c0848>}
    cursorclass
    <class 'MySQLdb.cursors.Cursor'>
    k
    254
    kwargs
    {u'charset': u'utf8',
     u'client_flag': 2,
     u'conv': {0: <function typecast_decimal at 0x7fd659abfcf8>,
               1: <type 'int'>,
               2: <type 'int'>,
               3: <type 'long'>,
               4: <type 'float'>,
               5: <type 'float'>,
               7: <function mysql_timestamp_converter at 0x7fd6586c00c8>,
               8: <type 'long'>,
               9: <type 'int'>,
               10: <function Date_or_None at 0x7fd6586b5ed8>,
               11: <function typecast_time at 0x7fd659abfc08>,
               12: <function DateTime_or_None at 0x7fd6586b5d70>,
               13: <type 'int'>,
               15: [(128, <type 'str'>)],
               246: <function typecast_decimal at 0x7fd659abfcf8>,
               248: <function Str2Set at 0x7fd6586c06e0>,
               249: [(128, <type 'str'>)],
               250: [(128, <type 'str'>)],
               251: [(128, <type 'str'>)],
               252: [(128, <type 'str'>)],
               253: [(128, <type 'str'>)],
               254: [(128, <type 'str'>)],
               <type 'array.array'>: <function array2Str at 0x7fd6586c0aa0>,
               <type 'datetime.timedelta'>: <function DateTimeDelta2literal at 0x7fd6586c0050>,
               <type 'datetime.datetime'>: <function adapt_datetime_warn_on_aware_datetime at 0x7fd657a538c0>,
               <type 'datetime.date'>: <function Thing2Literal at 0x7fd6586c09b0>,
               <type 'bool'>: <function Bool2Str at 0x7fd6586c05f0>,
               <type 'float'>: <function Float2Str at 0x7fd6586c08c0>,
               <type 'int'>: <function Thing2Str at 0x7fd6586c07d0>,
               <type 'list'>: <function quote_tuple at 0x7fd6586c0b18>,
               <type 'long'>: <function Thing2Str at 0x7fd6586c07d0>,
               <type 'dict'>: <built-in function escape_dict>,
               <type 'NoneType'>: <function None2NULL at 0x7fd6586c0938>,
               <type 'set'>: <function Set2Str at 0x7fd6586c0758>,
               <type 'str'>: <function Thing2Literal at 0x7fd6586c09b0>,
               <type 'tuple'>: <function quote_tuple at 0x7fd6586c0b18>,
               <type 'unicode'>: <function Unicode2Str at 0x7fd6586c0848>},
     u'db': 'yimei_site',
     u'host': 'localhost',
     u'passwd': '123456',
     u'use_unicode': True,
     u'user': 'root'}
    kwargs2
    {u'client_flag': 196610,
     u'conv': {0: <function typecast_decimal at 0x7fd659abfcf8>,
               1: <type 'int'>,
               2: <type 'int'>,
               3: <type 'long'>,
               4: <type 'float'>,
               5: <type 'float'>,
               7: <function mysql_timestamp_converter at 0x7fd6586c00c8>,
               8: <type 'long'>,
               9: <type 'int'>,
               10: <function Date_or_None at 0x7fd6586b5ed8>,
               11: <function typecast_time at 0x7fd659abfc08>,
               12: <function DateTime_or_None at 0x7fd6586b5d70>,
               13: <type 'int'>,
               15: [(128, <type 'str'>)],
               246: <function typecast_decimal at 0x7fd659abfcf8>,
               248: <function Str2Set at 0x7fd6586c06e0>,
               249: [(128, <type 'str'>)],
               250: [(128, <type 'str'>)],
               251: [(128, <type 'str'>)],
               252: [(128, <type 'str'>)],
               253: [(128, <type 'str'>)],
               254: [(128, <type 'str'>)],
               <type 'array.array'>: <function array2Str at 0x7fd6586c0aa0>,
               <type 'datetime.timedelta'>: <function DateTimeDelta2literal at 0x7fd6586c0050>,
               <type 'datetime.datetime'>: <function adapt_datetime_warn_on_aware_datetime at 0x7fd657a538c0>,
               <type 'datetime.date'>: <function Thing2Literal at 0x7fd6586c09b0>,
               <type 'bool'>: <function Bool2Str at 0x7fd6586c05f0>,
               <type 'float'>: <function Float2Str at 0x7fd6586c08c0>,
               <type 'int'>: <function Thing2Str at 0x7fd6586c07d0>,
               <type 'list'>: <function quote_tuple at 0x7fd6586c0b18>,
               <type 'long'>: <function Thing2Str at 0x7fd6586c07d0>,
               <type 'dict'>: <built-in function escape_dict>,
               <type 'NoneType'>: <function None2NULL at 0x7fd6586c0938>,
               <type 'set'>: <function Set2Str at 0x7fd6586c0758>,
               <type 'str'>: <function Thing2Literal at 0x7fd6586c09b0>,
               <type 'tuple'>: <function quote_tuple at 0x7fd6586c0b18>,
               <type 'unicode'>: <function Unicode2Str at 0x7fd6586c0848>},
     u'db': 'yimei_site',
     u'host': 'localhost',
     u'passwd': '123456',
     u'user': 'root'}
    n
    '5'
    proxy
    <built-in function proxy>
    self
    <_mysql.connection closed at 28f13b0>
    sql_mode
    ''
    use_unicode
    True
    v
    [(128, <type 'str'>)]


  • Request information

    USER

    AnonymousUser

    GET

    No GET data

    POST

    No POST data

    FILES

    No FILES data

    No cookie data

    META

    Variable Value
    CONTENT_LENGTH
    ''
    CONTENT_TYPE
    ''
    DOCUMENT_ROOT
    '/usr/share/nginx/html'
    HTTP_ACCEPT
    '*/*'
    HTTP_ACCEPT_ENCODING
    'deflate, gzip'
    HTTP_HOST
    'yimeitex.com'
    HTTP_USER_AGENT
    'Mozilla/5.0+(compatible;+Baiduspider/2.0;++http://www.baidu.com/search/spider.html)'
    PATH_INFO
    u'/products/woollen'
    QUERY_STRING
    ''
    REMOTE_ADDR
    '175.29.94.136'
    REMOTE_PORT
    '20000'
    REQUEST_METHOD
    'GET'
    REQUEST_SCHEME
    'http'
    REQUEST_URI
    '/products/woollen'
    SCRIPT_NAME
    u''
    SERVER_NAME
    'yimeitex.com'
    SERVER_PORT
    '80'
    SERVER_PROTOCOL
    'HTTP/1.1'
    uwsgi.node
    'iZ2317pg0u1Z'
    uwsgi.version
    '2.0.15'
    wsgi.errors
    <open file 'wsgi_errors', mode 'w' at 0x7fd6578fe420>
    wsgi.file_wrapper
    ''
    wsgi.input
    <uwsgi._Input object at 0x7fd656d7b168>
    wsgi.multiprocess
    True
    wsgi.multithread
    False
    wsgi.run_once
    False
    wsgi.url_scheme
    'http'
    wsgi.version
    (1, 0)

    Settings

    Using settings module yimei_site.settings

    Setting Value
    ABSOLUTE_URL_OVERRIDES
    {}
    ADMINS
    []
    ALLOWED_HOSTS
    ['yimeitex.com', 'www.yimeitex.com', 'localhost', '127.0.0.1']
    APPEND_SLASH
    True
    AUTHENTICATION_BACKENDS
    [u'django.contrib.auth.backends.ModelBackend']
    AUTH_PASSWORD_VALIDATORS
    u'********************'
    AUTH_USER_MODEL
    u'auth.User'
    BASE_DIR
    '/root/django_projects/yimei_site'
    CACHES
    {u'default': {u'BACKEND': u'django.core.cache.backends.locmem.LocMemCache'}}
    CACHE_MIDDLEWARE_ALIAS
    u'default'
    CACHE_MIDDLEWARE_KEY_PREFIX
    u'********************'
    CACHE_MIDDLEWARE_SECONDS
    600
    CSRF_COOKIE_AGE
    31449600
    CSRF_COOKIE_DOMAIN
    None
    CSRF_COOKIE_HTTPONLY
    False
    CSRF_COOKIE_NAME
    u'csrftoken'
    CSRF_COOKIE_PATH
    u'/'
    CSRF_COOKIE_SECURE
    False
    CSRF_FAILURE_VIEW
    u'django.views.csrf.csrf_failure'
    CSRF_HEADER_NAME
    u'HTTP_X_CSRFTOKEN'
    CSRF_TRUSTED_ORIGINS
    []
    CSRF_USE_SESSIONS
    False
    DATABASES
    {'default': {'ATOMIC_REQUESTS': False,
                 'AUTOCOMMIT': True,
                 'CONN_MAX_AGE': 0,
                 'ENGINE': 'django.db.backends.mysql',
                 'HOST': 'localhost',
                 'NAME': 'yimei_site',
                 'OPTIONS': {},
                 'PASSWORD': u'********************',
                 'PORT': '',
                 'TEST': {'CHARSET': None,
                          'COLLATION': None,
                          'MIRROR': None,
                          'NAME': None},
                 'TIME_ZONE': None,
                 'USER': 'root'}}
    DATABASE_ROUTERS
    []
    DATA_UPLOAD_MAX_MEMORY_SIZE
    2621440
    DATA_UPLOAD_MAX_NUMBER_FIELDS
    1000
    DATETIME_FORMAT
    u'N j, Y, P'
    DATETIME_INPUT_FORMATS
    [u'%Y-%m-%d %H:%M:%S',
     u'%Y-%m-%d %H:%M:%S.%f',
     u'%Y-%m-%d %H:%M',
     u'%Y-%m-%d',
     u'%m/%d/%Y %H:%M:%S',
     u'%m/%d/%Y %H:%M:%S.%f',
     u'%m/%d/%Y %H:%M',
     u'%m/%d/%Y',
     u'%m/%d/%y %H:%M:%S',
     u'%m/%d/%y %H:%M:%S.%f',
     u'%m/%d/%y %H:%M',
     u'%m/%d/%y']
    DATE_FORMAT
    u'N j, Y'
    DATE_INPUT_FORMATS
    [u'%Y-%m-%d',
     u'%m/%d/%Y',
     u'%m/%d/%y',
     u'%b %d %Y',
     u'%b %d, %Y',
     u'%d %b %Y',
     u'%d %b, %Y',
     u'%B %d %Y',
     u'%B %d, %Y',
     u'%d %B %Y',
     u'%d %B, %Y']
    DEBUG
    True
    DEBUG_PROPAGATE_EXCEPTIONS
    False
    DECIMAL_SEPARATOR
    u'.'
    DEFAULT_CHARSET
    u'utf-8'
    DEFAULT_CONTENT_TYPE
    u'text/html'
    DEFAULT_EXCEPTION_REPORTER_FILTER
    u'django.views.debug.SafeExceptionReporterFilter'
    DEFAULT_FILE_STORAGE
    u'django.core.files.storage.FileSystemStorage'
    DEFAULT_FROM_EMAIL
    u'webmaster@localhost'
    DEFAULT_INDEX_TABLESPACE
    u''
    DEFAULT_TABLESPACE
    u''
    DISALLOWED_USER_AGENTS
    []
    EMAIL_BACKEND
    u'django.core.mail.backends.smtp.EmailBackend'
    EMAIL_HOST
    u'localhost'
    EMAIL_HOST_PASSWORD
    u'********************'
    EMAIL_HOST_USER
    u''
    EMAIL_PORT
    25
    EMAIL_SSL_CERTFILE
    None
    EMAIL_SSL_KEYFILE
    u'********************'
    EMAIL_SUBJECT_PREFIX
    u'[Django] '
    EMAIL_TIMEOUT
    None
    EMAIL_USE_LOCALTIME
    False
    EMAIL_USE_SSL
    False
    EMAIL_USE_TLS
    False
    FILE_CHARSET
    u'utf-8'
    FILE_UPLOAD_DIRECTORY_PERMISSIONS
    None
    FILE_UPLOAD_HANDLERS
    [u'django.core.files.uploadhandler.MemoryFileUploadHandler',
     u'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
    FORM_RENDERER
    u'django.forms.renderers.DjangoTemplates'
    IGNORABLE_404_URLS
    []
    INSTALLED_APPS
    ['front.apps.FrontConfig',
     'django.contrib.admin',
     'django.contrib.auth',
     'django.contrib.contenttypes',
     'django.contrib.sessions',
     'django.contrib.messages',
     'django.contrib.staticfiles']
    INTERNAL_IPS
    []
    LANGUAGES
    [(u'af', u'Afrikaans'),
     (u'ar', u'Arabic'),
     (u'ast', u'Asturian'),
     (u'az', u'Azerbaijani'),
     (u'bg', u'Bulgarian'),
     (u'be', u'Belarusian'),
     (u'bn', u'Bengali'),
     (u'br', u'Breton'),
     (u'bs', u'Bosnian'),
     (u'ca', u'Catalan'),
     (u'cs', u'Czech'),
     (u'cy', u'Welsh'),
     (u'da', u'Danish'),
     (u'de', u'German'),
     (u'dsb', u'Lower Sorbian'),
     (u'el', u'Greek'),
     (u'en', u'English'),
     (u'en-au', u'Australian English'),
     (u'en-gb', u'British English'),
     (u'eo', u'Esperanto'),
     (u'es', u'Spanish'),
     (u'es-ar', u'Argentinian Spanish'),
     (u'es-co', u'Colombian Spanish'),
     (u'es-mx', u'Mexican Spanish'),
     (u'es-ni', u'Nicaraguan Spanish'),
     (u'es-ve', u'Venezuelan Spanish'),
     (u'et', u'Estonian'),
     (u'eu', u'Basque'),
     (u'fa', u'Persian'),
     (u'fi', u'Finnish'),
     (u'fr', u'French'),
     (u'fy', u'Frisian'),
     (u'ga', u'Irish'),
     (u'gd', u'Scottish Gaelic'),
     (u'gl', u'Galician'),
     (u'he', u'Hebrew'),
     (u'hi', u'Hindi'),
     (u'hr', u'Croatian'),
     (u'hsb', u'Upper Sorbian'),
     (u'hu', u'Hungarian'),
     (u'ia', u'Interlingua'),
     (u'id', u'Indonesian'),
     (u'io', u'Ido'),
     (u'is', u'Icelandic'),
     (u'it', u'Italian'),
     (u'ja', u'Japanese'),
     (u'ka', u'Georgian'),
     (u'kk', u'Kazakh'),
     (u'km', u'Khmer'),
     (u'kn', u'Kannada'),
     (u'ko', u'Korean'),
     (u'lb', u'Luxembourgish'),
     (u'lt', u'Lithuanian'),
     (u'lv', u'Latvian'),
     (u'mk', u'Macedonian'),
     (u'ml', u'Malayalam'),
     (u'mn', u'Mongolian'),
     (u'mr', u'Marathi'),
     (u'my', u'Burmese'),
     (u'nb', u'Norwegian Bokm\xe5l'),
     (u'ne', u'Nepali'),
     (u'nl', u'Dutch'),
     (u'nn', u'Norwegian Nynorsk'),
     (u'os', u'Ossetic'),
     (u'pa', u'Punjabi'),
     (u'pl', u'Polish'),
     (u'pt', u'Portuguese'),
     (u'pt-br', u'Brazilian Portuguese'),
     (u'ro', u'Romanian'),
     (u'ru', u'Russian'),
     (u'sk', u'Slovak'),
     (u'sl', u'Slovenian'),
     (u'sq', u'Albanian'),
     (u'sr', u'Serbian'),
     (u'sr-latn', u'Serbian Latin'),
     (u'sv', u'Swedish'),
     (u'sw', u'Swahili'),
     (u'ta', u'Tamil'),
     (u'te', u'Telugu'),
     (u'th', u'Thai'),
     (u'tr', u'Turkish'),
     (u'tt', u'Tatar'),
     (u'udm', u'Udmurt'),
     (u'uk', u'Ukrainian'),
     (u'ur', u'Urdu'),
     (u'vi', u'Vietnamese'),
     (u'zh-hans', u'Simplified Chinese'),
     (u'zh-hant', u'Traditional Chinese')]
    LANGUAGES_BIDI
    [u'he', u'ar', u'fa', u'ur']
    LANGUAGE_CODE
    'zh-hans'
    LANGUAGE_COOKIE_AGE
    None
    LANGUAGE_COOKIE_DOMAIN
    None
    LANGUAGE_COOKIE_NAME
    u'django_language'
    LANGUAGE_COOKIE_PATH
    u'/'
    LOCALE_PATHS
    []
    LOGGING
    {}
    LOGGING_CONFIG
    u'logging.config.dictConfig'
    LOGIN_REDIRECT_URL
    u'/accounts/profile/'
    LOGIN_URL
    u'/accounts/login/'
    LOGOUT_REDIRECT_URL
    None
    MANAGERS
    []
    MEDIA_ROOT
    u''
    MEDIA_URL
    u''
    MESSAGE_STORAGE
    u'django.contrib.messages.storage.fallback.FallbackStorage'
    MIDDLEWARE
    ['django.middleware.security.SecurityMiddleware',
     'django.contrib.sessions.middleware.SessionMiddleware',
     'django.middleware.locale.LocaleMiddleware',
     'django.middleware.common.CommonMiddleware',
     'django.middleware.csrf.CsrfViewMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
     'django.contrib.messages.middleware.MessageMiddleware',
     'django.middleware.clickjacking.XFrameOptionsMiddleware']
    MIDDLEWARE_CLASSES
    [u'django.middleware.common.CommonMiddleware',
     u'django.middleware.csrf.CsrfViewMiddleware']
    MIGRATION_MODULES
    {}
    MONTH_DAY_FORMAT
    u'F j'
    NUMBER_GROUPING
    0
    PASSWORD_HASHERS
    u'********************'
    PASSWORD_RESET_TIMEOUT_DAYS
    u'********************'
    PREPEND_WWW
    False
    ROOT_URLCONF
    'yimei_site.urls'
    SECRET_KEY
    u'********************'
    SECURE_BROWSER_XSS_FILTER
    False
    SECURE_CONTENT_TYPE_NOSNIFF
    False
    SECURE_HSTS_INCLUDE_SUBDOMAINS
    False
    SECURE_HSTS_PRELOAD
    False
    SECURE_HSTS_SECONDS
    0
    SECURE_PROXY_SSL_HEADER
    None
    SECURE_REDIRECT_EXEMPT
    []
    SECURE_SSL_HOST
    None
    SECURE_SSL_REDIRECT
    False
    SERVER_EMAIL
    u'root@localhost'
    SESSION_CACHE_ALIAS
    u'default'
    SESSION_COOKIE_AGE
    1209600
    SESSION_COOKIE_DOMAIN
    None
    SESSION_COOKIE_HTTPONLY
    True
    SESSION_COOKIE_NAME
    u'sessionid'
    SESSION_COOKIE_PATH
    u'/'
    SESSION_COOKIE_SECURE
    False
    SESSION_ENGINE
    u'django.contrib.sessions.backends.db'
    SESSION_EXPIRE_AT_BROWSER_CLOSE
    False
    SESSION_FILE_PATH
    None
    SESSION_SAVE_EVERY_REQUEST
    False
    SESSION_SERIALIZER
    u'django.contrib.sessions.serializers.JSONSerializer'
    SETTINGS_MODULE
    'yimei_site.settings'
    SHORT_DATETIME_FORMAT
    u'm/d/Y P'
    SHORT_DATE_FORMAT
    u'm/d/Y'
    SIGNING_BACKEND
    u'django.core.signing.TimestampSigner'
    SILENCED_SYSTEM_CHECKS
    []
    STATICFILES_DIRS
    []
    STATICFILES_FINDERS
    [u'django.contrib.staticfiles.finders.FileSystemFinder',
     u'django.contrib.staticfiles.finders.AppDirectoriesFinder']
    STATICFILES_STORAGE
    u'django.contrib.staticfiles.storage.StaticFilesStorage'
    STATIC_ROOT
    '/root/django_projects/yimei_site/static/'
    STATIC_URL
    '/static/'
    TEMPLATES
    [{'APP_DIRS': True,
      'BACKEND': 'django.template.backends.django.DjangoTemplates',
      'DIRS': [],
      '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
    u'django.test.runner.DiscoverRunner'
    THOUSAND_SEPARATOR
    u','
    TIME_FORMAT
    u'P'
    TIME_INPUT_FORMATS
    [u'%H:%M:%S', u'%H:%M:%S.%f', u'%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
    False
    USE_X_FORWARDED_PORT
    False
    WSGI_APPLICATION
    'yimei_site.wsgi.application'
    X_FRAME_OPTIONS
    u'SAMEORIGIN'
    YEAR_MONTH_FORMAT
    u'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.