DoesNotExist at /sitemap.xml

Site matching query does not exist.
Request Method:
GET
Request URL:
http://www.foolcat.cn/sitemap.xml
Django Version:
3.2.11
Exception Type:
DoesNotExist
Exception Value:
Site matching query does not exist.
Exception Location:
/usr/local/lib/python3.10/site-packages/django/db/models/query.py, line 435, in get
Python Executable:
/usr/local/bin/python
Python Version:
3.10.2
Python Path:
['/usr/local/bin',
 '/code/djangoBlog',
 '/code/djangoblog',
 '/usr/local/lib/python310.zip',
 '/usr/local/lib/python3.10',
 '/usr/local/lib/python3.10/lib-dynload',
 '/usr/local/lib/python3.10/site-packages']
Server time:
Tue, 29 Nov 2022 11:32:52 +0800

Traceback Switch to copy-and-paste view

  • /usr/local/lib/python3.10/site-packages/django/core/handlers/exception.py, line 47, in inner
    1.                 response = await sync_to_async(response_for_exception, thread_sensitive=False)(request, exc)
    2.             return response
    3.         return inner
    4.     else:
    5.         @wraps(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
    DoesNotExist('Site matching query does not exist.')
    get_response
    <bound method BaseHandler._get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x7f0d8777e320>>
    request
    <WSGIRequest: GET '/sitemap.xml'>
  • /usr/local/lib/python3.10/site-packages/django/core/handlers/base.py, line 181, in _get_response
    1.         if response is None:
    2.             wrapped_callback = self.make_view_atomic(callback)
    3.             # If it is an asynchronous view, run it in a subthread.
    4.             if asyncio.iscoroutinefunction(wrapped_callback):
    5.                 wrapped_callback = async_to_sync(wrapped_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.                 if response is None:
    4.                     raise
    5.         # Complain if the view returned None (a common error).
    Variable Value
    callback
    <function sitemap at 0x7f0d83f15990>
    callback_args
    ()
    callback_kwargs
    {'sitemaps': {'Category': <class 'djangoblog.sitemap.CategorySiteMap'>,
                  'Tag': <class 'djangoblog.sitemap.TagSiteMap'>,
                  'User': <class 'djangoblog.sitemap.UserSiteMap'>,
                  'blog': <class 'djangoblog.sitemap.ArticleSiteMap'>,
                  'static': <class 'djangoblog.sitemap.StaticViewSitemap'>}}
    middleware_method
    <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x7f0d874a4a30>>
    request
    <WSGIRequest: GET '/sitemap.xml'>
    response
    None
    self
    <django.core.handlers.wsgi.WSGIHandler object at 0x7f0d8777e320>
    wrapped_callback
    <function sitemap at 0x7f0d83f15990>
  • /usr/local/lib/python3.10/site-packages/django/contrib/sitemaps/views.py, line 16, in inner
    1. from django.urls import reverse
    2. from django.utils.http import http_date
    3. def x_robots_tag(func):
    4.     @wraps(func)
    5.     def inner(request, *args, **kwargs):
    1.         response = func(request, *args, **kwargs)
    1.         response.headers['X-Robots-Tag'] = 'noindex, noodp, noarchive'
    2.         return response
    3.     return inner
    4. @x_robots_tag
    Variable Value
    args
    ()
    func
    <function sitemap at 0x7f0d83f15900>
    kwargs
    {'sitemaps': {'Category': <class 'djangoblog.sitemap.CategorySiteMap'>,
                  'Tag': <class 'djangoblog.sitemap.TagSiteMap'>,
                  'User': <class 'djangoblog.sitemap.UserSiteMap'>,
                  'blog': <class 'djangoblog.sitemap.ArticleSiteMap'>,
                  'static': <class 'djangoblog.sitemap.StaticViewSitemap'>}}
    request
    <WSGIRequest: GET '/sitemap.xml'>
  • /usr/local/lib/python3.10/site-packages/django/contrib/sitemaps/views.py, line 53, in sitemap
    1. @x_robots_tag
    2. def sitemap(request, sitemaps, section=None,
    3.             template_name='sitemap.xml', content_type='application/xml'):
    4.     req_protocol = request.scheme
    1.     req_site = get_current_site(request)
    1.     if section is not None:
    2.         if section not in sitemaps:
    3.             raise Http404("No sitemap available for section: %r" % section)
    4.         maps = [sitemaps[section]]
    5.     else:
    Variable Value
    content_type
    'application/xml'
    req_protocol
    'http'
    request
    <WSGIRequest: GET '/sitemap.xml'>
    section
    None
    sitemaps
    {'Category': <class 'djangoblog.sitemap.CategorySiteMap'>,
     'Tag': <class 'djangoblog.sitemap.TagSiteMap'>,
     'User': <class 'djangoblog.sitemap.UserSiteMap'>,
     'blog': <class 'djangoblog.sitemap.ArticleSiteMap'>,
     'static': <class 'djangoblog.sitemap.StaticViewSitemap'>}
    template_name
    'sitemap.xml'
  • /usr/local/lib/python3.10/site-packages/django/contrib/sites/shortcuts.py, line 13, in get_current_site
    1.     Check if contrib.sites is installed and return either the current
    2.     ``Site`` object or a ``RequestSite`` object based on the request.
    3.     """
    4.     # Imports are inside the function because its point is to avoid importing
    5.     # the Site models when django.contrib.sites isn't installed.
    6.     if apps.is_installed('django.contrib.sites'):
    7.         from .models import Site
    1.         return Site.objects.get_current(request)
    1.     else:
    2.         from .requests import RequestSite
    3.         return RequestSite(request)
    Variable Value
    Site
    <class 'django.contrib.sites.models.Site'>
    request
    <WSGIRequest: GET '/sitemap.xml'>
  • /usr/local/lib/python3.10/site-packages/django/contrib/sites/models.py, line 58, in get_current
    1.         If SITE_ID isn't defined, return the site with domain matching
    2.         request.get_host(). The ``Site`` object is cached the first time it's
    3.         retrieved from the database.
    4.         """
    5.         from django.conf import settings
    6.         if getattr(settings, 'SITE_ID', ''):
    7.             site_id = settings.SITE_ID
    1.             return self._get_site_by_id(site_id)
    1.         elif request:
    2.             return self._get_site_by_request(request)
    3.         raise ImproperlyConfigured(
    4.             "You're using the Django \"sites framework\" without having "
    5.             "set the SITE_ID setting. Create a site in your database and "
    Variable Value
    request
    <WSGIRequest: GET '/sitemap.xml'>
    self
    <django.contrib.sites.models.SiteManager object at 0x7f0d87d99e10>
    settings
    <LazySettings "djangoblog.settings">
    site_id
    1
  • /usr/local/lib/python3.10/site-packages/django/contrib/sites/models.py, line 30, in _get_site_by_id
    1. class SiteManager(models.Manager):
    2.     use_in_migrations = True
    3.     def _get_site_by_id(self, site_id):
    4.         if site_id not in SITE_CACHE:
    1.             site = self.get(pk=site_id)
    1.             SITE_CACHE[site_id] = site
    2.         return SITE_CACHE[site_id]
    3.     def _get_site_by_request(self, request):
    4.         host = request.get_host()
    5.         try:
    Variable Value
    self
    <django.contrib.sites.models.SiteManager object at 0x7f0d87d99e10>
    site_id
    1
  • /usr/local/lib/python3.10/site-packages/django/db/models/manager.py, line 85, in manager_method
    1.     def check(self, **kwargs):
    2.         return []
    3.     @classmethod
    4.     def _get_queryset_methods(cls, queryset_class):
    5.         def create_method(name, method):
    6.             def manager_method(self, *args, **kwargs):
    1.                 return getattr(self.get_queryset(), name)(*args, **kwargs)
    1.             manager_method.__name__ = method.__name__
    2.             manager_method.__doc__ = method.__doc__
    3.             return manager_method
    4.         new_methods = {}
    5.         for name, method in inspect.getmembers(queryset_class, predicate=inspect.isfunction):
    Variable Value
    args
    ()
    kwargs
    {'pk': 1}
    name
    'get'
    self
    <django.contrib.sites.models.SiteManager object at 0x7f0d87d99e10>
  • /usr/local/lib/python3.10/site-packages/django/db/models/query.py, line 435, in get
    1.         if not clone.query.select_for_update or connections[clone.db].features.supports_select_for_update_with_limit:
    2.             limit = MAX_GET_RESULTS
    3.             clone.query.set_limits(high=limit)
    4.         num = len(clone)
    5.         if num == 1:
    6.             return clone._result_cache[0]
    7.         if not num:
    1.             raise self.model.DoesNotExist(
    1.                 "%s matching query does not exist." %
    2.                 self.model._meta.object_name
    3.             )
    4.         raise self.model.MultipleObjectsReturned(
    5.             'get() returned more than one %s -- it returned %s!' % (
    6.                 self.model._meta.object_name,
    Variable Value
    args
    ()
    clone
    <QuerySet []>
    kwargs
    {'pk': 1}
    limit
    21
    num
    0
    self
    <QuerySet [<Site: foolcat.cn>]>


  • Request information

    USER

    AnonymousUser

    GET

    No GET data

    POST

    No POST data

    FILES

    No FILES data

    No cookie data

    META

    Variable Value
    HTTP_ACCEPT
    '*/*'
    HTTP_ACCEPT_ENCODING
    'deflate, gzip'
    HTTP_CONNECTION
    'close'
    HTTP_HOST
    'www.foolcat.cn'
    HTTP_USER_AGENT
    'Mozilla/5.0+(compatible;+Baiduspider/2.0;++http://www.baidu.com/search/spider.html)'
    HTTP_X_FORWARDED_FOR
    '154.218.131.203, 172.21.0.1'
    HTTP_X_NGINX_PROXY
    'true'
    HTTP_X_REAL_IP
    '172.21.0.1'
    PATH_INFO
    '/sitemap.xml'
    QUERY_STRING
    ''
    RAW_URI
    '/sitemap.xml'
    REMOTE_ADDR
    '172.21.0.2'
    REMOTE_PORT
    '33722'
    REQUEST_METHOD
    'GET'
    SCRIPT_NAME
    ''
    SERVER_NAME
    '0.0.0.0'
    SERVER_PORT
    '8000'
    SERVER_PROTOCOL
    'HTTP/1.0'
    SERVER_SOFTWARE
    'gunicorn/20.1.0'
    gunicorn.socket
    <gevent._socket3.socket at 0x7f0d835dc880 object, fd=12, family=2, type=1, proto=6>
    wsgi.errors
    <gunicorn.http.wsgi.WSGIErrorsWrapper object at 0x7f0d83bcb640>
    wsgi.file_wrapper
    <class 'gunicorn.http.wsgi.FileWrapper'>
    wsgi.input
    <gunicorn.http.body.Body object at 0x7f0d83ae53f0>
    wsgi.input_terminated
    True
    wsgi.multiprocess
    False
    wsgi.multithread
    True
    wsgi.run_once
    False
    wsgi.url_scheme
    'http'
    wsgi.version
    (1, 0)

    Settings

    Using settings module djangoblog.settings

    Setting Value
    ABSOLUTE_URL_OVERRIDES
    {}
    ADMINS
    [('admin', 'admin@admin.com')]
    ALLOWED_HOSTS
    ['*', '127.0.0.1', 'example.com']
    APPEND_SLASH
    True
    AUTHENTICATION_BACKENDS
    ['accounts.user_login_backend.EmailOrUsernameModelBackend']
    AUTH_PASSWORD_VALIDATORS
    '********************'
    AUTH_USER_MODEL
    'accounts.BlogUser'
    BAIDU_NOTIFY_URL
    'http://data.zz.baidu.com/urls?site=https://www.lylinux.net&token=1uAOGrMsUm5syDGn'
    BASE_DIR
    '/code/djangoblog'
    BOOTSTRAP_COLOR_TYPES
    ['default', 'primary', 'success', 'info', 'warning', 'danger']
    CACHES
    {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
                 'LOCATION': 'unique-snowflake',
                 'TIMEOUT': 10800}}
    CACHE_CONTROL_MAX_AGE
    2592000
    CACHE_MIDDLEWARE_ALIAS
    'default'
    CACHE_MIDDLEWARE_KEY_PREFIX
    '********************'
    CACHE_MIDDLEWARE_SECONDS
    600
    COMPRESSORS
    {'css': 'compressor.css.CssCompressor', 'js': 'compressor.js.JsCompressor'}
    COMPRESS_CACHEABLE_PRECOMPILERS
    ()
    COMPRESS_CACHE_BACKEND
    'default'
    COMPRESS_CACHE_KEY_FUNCTION
    '********************'
    COMPRESS_CLEAN_CSS_ARGUMENTS
    ''
    COMPRESS_CLEAN_CSS_BINARY
    'cleancss'
    COMPRESS_CLOSURE_COMPILER_ARGUMENTS
    ''
    COMPRESS_CLOSURE_COMPILER_BINARY
    'java -jar compiler.jar'
    COMPRESS_CSS_FILTERS
    ['compressor.filters.css_default.CssAbsoluteFilter',
     'compressor.filters.cssmin.CSSMinFilter']
    COMPRESS_CSS_HASHING_METHOD
    'mtime'
    COMPRESS_DATA_URI_MAX_SIZE
    1024
    COMPRESS_DEBUG_TOGGLE
    None
    COMPRESS_ENABLED
    True
    COMPRESS_FILTERS
    {'css': ['compressor.filters.css_default.CssAbsoluteFilter',
             'compressor.filters.cssmin.rCSSMinFilter'],
     'js': ['compressor.filters.jsmin.rJSMinFilter']}
    COMPRESS_JINJA2_GET_ENVIRONMENT
    <function CompressorConf.JINJA2_GET_ENVIRONMENT at 0x7f0d87761a20>
    COMPRESS_JS_FILTERS
    ['compressor.filters.jsmin.JSMinFilter']
    COMPRESS_MINT_DELAY
    30
    COMPRESS_MTIME_DELAY
    10
    COMPRESS_OFFLINE
    False
    COMPRESS_OFFLINE_CONTEXT
    {'STATIC_URL': '/static/'}
    COMPRESS_OFFLINE_MANIFEST
    'manifest.json'
    COMPRESS_OFFLINE_TIMEOUT
    31536000
    COMPRESS_OUTPUT_DIR
    'CACHE'
    COMPRESS_PARSER
    'compressor.parser.AutoSelectParser'
    COMPRESS_PRECOMPILERS
    ()
    COMPRESS_REBUILD_TIMEOUT
    2592000
    COMPRESS_ROOT
    '/code/djangoblog/collectedstatic'
    COMPRESS_STORAGE
    'compressor.storage.CompressorFileStorage'
    COMPRESS_TEMPLATE_FILTER_CONTEXT
    {'STATIC_URL': '/static/'}
    COMPRESS_URL
    '/static/'
    COMPRESS_URL_PLACEHOLDER
    '/__compressor_url_placeholder__/'
    COMPRESS_VERBOSE
    False
    COMPRESS_YUGLIFY_BINARY
    'yuglify'
    COMPRESS_YUGLIFY_CSS_ARGUMENTS
    '--terminal'
    COMPRESS_YUGLIFY_JS_ARGUMENTS
    '--terminal'
    COMPRESS_YUI_BINARY
    'java -jar yuicompressor.jar'
    COMPRESS_YUI_CSS_ARGUMENTS
    ''
    COMPRESS_YUI_JS_ARGUMENTS
    ''
    CSRF_COOKIE_AGE
    31449600
    CSRF_COOKIE_DOMAIN
    None
    CSRF_COOKIE_HTTPONLY
    False
    CSRF_COOKIE_NAME
    'csrftoken'
    CSRF_COOKIE_PATH
    '/'
    CSRF_COOKIE_SAMESITE
    'Lax'
    CSRF_COOKIE_SECURE
    False
    CSRF_FAILURE_VIEW
    'django.views.csrf.csrf_failure'
    CSRF_HEADER_NAME
    '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': 'db',
                 'NAME': 'djangoblog',
                 'OPTIONS': {'charset': 'utf8mb4'},
                 'PASSWORD': '********************',
                 'PORT': 3306,
                 'TEST': {'CHARSET': None,
                          'COLLATION': None,
                          'MIGRATE': True,
                          '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
    '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',
     '%m/%d/%Y %H:%M:%S',
     '%m/%d/%Y %H:%M:%S.%f',
     '%m/%d/%Y %H:%M',
     '%m/%d/%y %H:%M:%S',
     '%m/%d/%y %H:%M:%S.%f',
     '%m/%d/%y %H:%M']
    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']
    DATE_TIME_FORMAT
    '%Y-%m-%d'
    DEBUG
    True
    DEBUG_PROPAGATE_EXCEPTIONS
    False
    DECIMAL_SEPARATOR
    '.'
    DEFAULT_AUTO_FIELD
    'django.db.models.BigAutoField'
    DEFAULT_CHARSET
    'utf-8'
    DEFAULT_EXCEPTION_REPORTER
    'django.views.debug.ExceptionReporter'
    DEFAULT_EXCEPTION_REPORTER_FILTER
    'django.views.debug.SafeExceptionReporterFilter'
    DEFAULT_FILE_STORAGE
    'django.core.files.storage.FileSystemStorage'
    DEFAULT_FROM_EMAIL
    None
    DEFAULT_HASHING_ALGORITHM
    'sha256'
    DEFAULT_INDEX_TABLESPACE
    ''
    DEFAULT_TABLESPACE
    ''
    DISALLOWED_USER_AGENTS
    []
    EMAIL_BACKEND
    'django.core.mail.backends.smtp.EmailBackend'
    EMAIL_HOST
    'smtp.mxhichina.com'
    EMAIL_HOST_PASSWORD
    '********************'
    EMAIL_HOST_USER
    None
    EMAIL_PORT
    465
    EMAIL_SSL_CERTFILE
    None
    EMAIL_SSL_KEYFILE
    '********************'
    EMAIL_SUBJECT_PREFIX
    '[Django] '
    EMAIL_TIMEOUT
    None
    EMAIL_USE_LOCALTIME
    False
    EMAIL_USE_SSL
    True
    EMAIL_USE_TLS
    False
    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
    420
    FILE_UPLOAD_TEMP_DIR
    None
    FIRST_DAY_OF_WEEK
    0
    FIXTURE_DIRS
    []
    FORCE_SCRIPT_NAME
    None
    FORMAT_MODULE_PATH
    None
    FORM_RENDERER
    'django.forms.renderers.DjangoTemplates'
    HAYSTACK_CONNECTIONS
    {'default': {'ENGINE': 'djangoblog.whoosh_cn_backend.WhooshEngine',
                 'PATH': '/code/djangoblog/djangoblog/whoosh_index'}}
    HAYSTACK_SIGNAL_PROCESSOR
    'haystack.signals.RealtimeSignalProcessor'
    IGNORABLE_404_URLS
    []
    INSTALLED_APPS
    ['django.contrib.admin.apps.SimpleAdminConfig',
     'django.contrib.auth',
     'django.contrib.contenttypes',
     'django.contrib.sessions',
     'django.contrib.messages',
     'django.contrib.staticfiles',
     'django.contrib.sites',
     'django.contrib.sitemaps',
     'mdeditor',
     'haystack',
     'blog',
     'accounts',
     'comments',
     'oauth',
     'servermanager',
     'owntracks',
     'compressor']
    INTERNAL_IPS
    []
    LANGUAGES
    [('af', 'Afrikaans'),
     ('ar', 'Arabic'),
     ('ar-dz', 'Algerian 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'),
     ('hy', 'Armenian'),
     ('ia', 'Interlingua'),
     ('id', 'Indonesian'),
     ('ig', 'Igbo'),
     ('io', 'Ido'),
     ('is', 'Icelandic'),
     ('it', 'Italian'),
     ('ja', 'Japanese'),
     ('ka', 'Georgian'),
     ('kab', 'Kabyle'),
     ('kk', 'Kazakh'),
     ('km', 'Khmer'),
     ('kn', 'Kannada'),
     ('ko', 'Korean'),
     ('ky', 'Kyrgyz'),
     ('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'),
     ('tg', 'Tajik'),
     ('th', 'Thai'),
     ('tk', 'Turkmen'),
     ('tr', 'Turkish'),
     ('tt', 'Tatar'),
     ('udm', 'Udmurt'),
     ('uk', 'Ukrainian'),
     ('ur', 'Urdu'),
     ('uz', 'Uzbek'),
     ('vi', 'Vietnamese'),
     ('zh-hans', 'Simplified Chinese'),
     ('zh-hant', 'Traditional Chinese')]
    LANGUAGES_BIDI
    ['he', 'ar', 'ar-dz', 'fa', 'ur']
    LANGUAGE_CODE
    'zh-hans'
    LANGUAGE_COOKIE_AGE
    None
    LANGUAGE_COOKIE_DOMAIN
    None
    LANGUAGE_COOKIE_HTTPONLY
    False
    LANGUAGE_COOKIE_NAME
    'django_language'
    LANGUAGE_COOKIE_PATH
    '/'
    LANGUAGE_COOKIE_SAMESITE
    None
    LANGUAGE_COOKIE_SECURE
    False
    LOCALE_PATHS
    []
    LOGGING
    {'disable_existing_loggers': False,
     'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'},
                 'require_debug_true': {'()': 'django.utils.log.RequireDebugTrue'}},
     'formatters': {'verbose': {'format': '[%(asctime)s] %(levelname)s '
                                          '[%(name)s.%(funcName)s:%(lineno)d '
                                          '%(module)s] %(message)s'}},
     'handlers': {'console': {'class': 'logging.StreamHandler',
                              'filters': ['require_debug_true'],
                              'formatter': 'verbose',
                              'level': 'DEBUG'},
                  'log_file': {'class': 'logging.handlers.RotatingFileHandler',
                               'filename': 'djangoblog.log',
                               'formatter': 'verbose',
                               'level': 'INFO',
                               'maxBytes': 16777216},
                  'mail_admins': {'class': 'django.utils.log.AdminEmailHandler',
                                  'filters': ['require_debug_false'],
                                  'level': 'ERROR'},
                  'null': {'class': 'logging.NullHandler'}},
     'loggers': {'django.request': {'handlers': ['mail_admins'],
                                    'level': 'ERROR',
                                    'propagate': False},
                 'djangoblog': {'handlers': ['log_file', 'console'],
                                'level': 'INFO',
                                'propagate': True}},
     'root': {'handlers': ['console', 'log_file'], 'level': 'INFO'},
     'version': 1}
    LOGGING_CONFIG
    'logging.config.dictConfig'
    LOGIN_REDIRECT_URL
    '/accounts/profile/'
    LOGIN_URL
    '/login/'
    LOGOUT_REDIRECT_URL
    None
    MANAGERS
    []
    MEDIA_ROOT
    '/code/djangoblog/uploads'
    MEDIA_URL
    '/media/'
    MESSAGE_STORAGE
    'django.contrib.messages.storage.fallback.FallbackStorage'
    MIDDLEWARE
    ['django.middleware.security.SecurityMiddleware',
     'django.contrib.sessions.middleware.SessionMiddleware',
     'django.middleware.gzip.GZipMiddleware',
     'django.middleware.common.CommonMiddleware',
     'django.middleware.csrf.CsrfViewMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
     'django.contrib.messages.middleware.MessageMiddleware',
     'django.middleware.clickjacking.XFrameOptionsMiddleware',
     'django.middleware.http.ConditionalGetMiddleware',
     'blog.middleware.OnlineMiddleware']
    MIGRATION_MODULES
    {}
    MONTH_DAY_FORMAT
    'F j'
    NUMBER_GROUPING
    0
    PAGINATE_BY
    10
    PASSWORD_HASHERS
    '********************'
    PASSWORD_RESET_TIMEOUT
    '********************'
    PASSWORD_RESET_TIMEOUT_DAYS
    '********************'
    PREPEND_WWW
    False
    ROOT_URLCONF
    'djangoblog.urls'
    SECRET_KEY
    '********************'
    SECURE_BROWSER_XSS_FILTER
    False
    SECURE_CONTENT_TYPE_NOSNIFF
    True
    SECURE_HSTS_INCLUDE_SUBDOMAINS
    False
    SECURE_HSTS_PRELOAD
    False
    SECURE_HSTS_SECONDS
    0
    SECURE_PROXY_SSL_HEADER
    None
    SECURE_REDIRECT_EXEMPT
    []
    SECURE_REFERRER_POLICY
    'same-origin'
    SECURE_SSL_HOST
    None
    SECURE_SSL_REDIRECT
    False
    SERVER_EMAIL
    None
    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_SAMESITE
    'Lax'
    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
    'djangoblog.settings'
    SHORT_DATETIME_FORMAT
    'm/d/Y P'
    SHORT_DATE_FORMAT
    'm/d/Y'
    SIGNING_BACKEND
    'django.core.signing.TimestampSigner'
    SILENCED_SYSTEM_CHECKS
    []
    SITE_ID
    1
    STATICFILES
    '/code/djangoblog/static'
    STATICFILES_DIRS
    []
    STATICFILES_FINDERS
    ('django.contrib.staticfiles.finders.FileSystemFinder',
     'django.contrib.staticfiles.finders.AppDirectoriesFinder',
     'compressor.finders.CompressorFinder')
    STATICFILES_STORAGE
    'django.contrib.staticfiles.storage.StaticFilesStorage'
    STATIC_ROOT
    '/code/djangoblog/collectedstatic'
    STATIC_URL
    '/static/'
    TEMPLATES
    [{'APP_DIRS': True,
      'BACKEND': 'django.template.backends.django.DjangoTemplates',
      'DIRS': ['/code/djangoblog/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',
                                         'blog.context_processors.seo_processor']}}]
    TESTING
    False
    TEST_NON_SERIALIZED_APPS
    []
    TEST_RUNNER
    'django.test.runner.DiscoverRunner'
    THOUSAND_SEPARATOR
    ','
    TIME_FORMAT
    '%Y-%m-%d %H:%M:%S'
    TIME_INPUT_FORMATS
    ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']
    TIME_ZONE
    'Asia/Shanghai'
    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
    'djangoblog.wsgi.application'
    WXADMIN
    '995F03AC401D6CABABAEF756FC4D43C7'
    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.