wagtail-demo.thelabnyc.com Open in urlscan Pro
3.226.163.224  Public Scan

Submitted URL: http://wagtail-demo.thelabnyc.com/
Effective URL: https://wagtail-demo.thelabnyc.com/
Submission: On March 22 via api from US — Scanned from DE

Form analysis 1 forms found in the DOM

Name: pasteformPOST https://dpaste.com/

<form action="https://dpaste.com/" name="pasteform" id="pasteform" method="post">
  <div id="pastebinTraceback" class="pastebin" style="display: none;">
    <input type="hidden" name="language" value="PythonConsole">
    <input type="hidden" name="title" value="OperationalError at /">
    <input type="hidden" name="source" value="Django Dpaste Agent">
    <input type="hidden" name="poster" value="Django">
    <textarea name="content" id="traceback_area" cols="140" rows="25">Environment:


Request Method: GET
Request URL: https://wagtail-demo.thelabnyc.com/

Django Version: 4.1.7
Python Version: 3.10.9
Installed Applications:
['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.sitemaps',
 'thelabui',
 'reactivated',
 'wagtail.contrib.forms',
 'wagtail.contrib.redirects',
 'wagtail.contrib.modeladmin',
 'wagtail.contrib.settings',
 'wagtail.contrib.routable_page',
 'wagtail.contrib.styleguide',
 'wagtail.contrib.frontend_cache',
 'wagtail.contrib.table_block',
 'wagtail.embeds',
 'wagtail.sites',
 'wagtail.users',
 'wagtail.snippets',
 'wagtail.documents',
 'wagtail.images',
 'wagtail.search',
 'wagtail.admin',
 'wagtail',
 'modelcluster',
 'taggit',
 'wagtailvideos',
 'server.cms']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
 'whitenoise.middleware.WhiteNoiseMiddleware',
 'thelabui.middleware.TuneCacheHeadersMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'wagtail.contrib.redirects.middleware.RedirectMiddleware',
 'thelabui.middleware.XForwardedForMiddleware',
 'thelabui.middleware.XRobotsMiddleware']



Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/django/db/backends/base/base.py", line 282, in ensure_connection
    self.connect()
  File "/usr/local/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/django/db/backends/base/base.py", line 263, in connect
    self.connection = self.get_new_connection(conn_params)
  File "/usr/local/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/django/db/backends/postgresql/base.py", line 215, in get_new_connection
    connection = Database.connect(**conn_params)
  File "/usr/local/lib/python3.10/site-packages/psycopg2/__init__.py", line 122, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)

The above exception (could not translate host name "db" to address: Temporary failure in name resolution
) was the direct cause of the following exception:
  File "/usr/local/lib/python3.10/site-packages/django/core/handlers/exception.py", line 56, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.10/site-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python3.10/site-packages/wagtail/views.py", line 14, in serve
    site = Site.find_for_request(request)
  File "/usr/local/lib/python3.10/site-packages/wagtail/models/sites.py", line 150, in find_for_request
    site = Site._find_for_request(request)
  File "/usr/local/lib/python3.10/site-packages/wagtail/models/sites.py", line 160, in _find_for_request
    site = get_site_for_hostname(hostname, port)
  File "/usr/local/lib/python3.10/site-packages/wagtail/models/sites.py", line 23, in get_site_for_hostname
    sites = list(
  File "/usr/local/lib/python3.10/site-packages/django/db/models/query.py", line 394, in __iter__
    self._fetch_all()
  File "/usr/local/lib/python3.10/site-packages/django/db/models/query.py", line 1867, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
  File "/usr/local/lib/python3.10/site-packages/django/db/models/query.py", line 87, in __iter__
    results = compiler.execute_sql(
  File "/usr/local/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1396, in execute_sql
    cursor = self.connection.cursor()
  File "/usr/local/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/django/db/backends/base/base.py", line 323, in cursor
    return self._cursor()
  File "/usr/local/lib/python3.10/site-packages/django/db/backends/base/base.py", line 299, in _cursor
    self.ensure_connection()
  File "/usr/local/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/django/db/backends/base/base.py", line 281, in ensure_connection
    with self.wrap_database_errors:
  File "/usr/local/lib/python3.10/site-packages/django/db/utils.py", line 91, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/usr/local/lib/python3.10/site-packages/django/db/backends/base/base.py", line 282, in ensure_connection
    self.connect()
  File "/usr/local/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/django/db/backends/base/base.py", line 263, in connect
    self.connection = self.get_new_connection(conn_params)
  File "/usr/local/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/django/db/backends/postgresql/base.py", line 215, in get_new_connection
    connection = Database.connect(**conn_params)
  File "/usr/local/lib/python3.10/site-packages/psycopg2/__init__.py", line 122, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)

Exception Type: OperationalError at /
Exception Value: could not translate host name "db" to address: Temporary failure in name resolution

</textarea>
    <br><br>
    <input type="submit" value="Share this traceback on a public website">
  </div>
</form>

Text Content

OPERATIONALERROR AT /

could not translate host name "db" to address: Temporary failure in name resolution


Request Method: GET Request URL: https://wagtail-demo.thelabnyc.com/ Django
Version: 4.1.7 Exception Type: OperationalError Exception Value:

could not translate host name "db" to address: Temporary failure in name resolution


Exception Location:
/usr/local/lib/python3.10/site-packages/psycopg2/__init__.py, line 122, in
connect Raised during: wagtail.views.serve Python Executable:
/usr/local/bin/uwsgi Python Version: 3.10.9 Python Path:

['.',
 '',
 '/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: Wed, 22 Mar 2023 20:05:49 +0000


TRACEBACK SWITCH TO COPY-AND-PASTE VIEW

 * /usr/local/lib/python3.10/site-packages/django/db/backends/base/base.py, line
   282, in ensure_connection
   
    275.             )
   
    276. 
   
    277.     @async_unsafe
   
    278.     def ensure_connection(self):
   
    279.         """Guarantee that a connection to the database is established."""
   
    280.         if self.connection is None:
   
    281.             with self.wrap_database_errors:
   
    282.                 self.connect()
         
         …
   
    283. 
   
    284.     # ##### Backend-specific wrappers for PEP-249 connection methods #####
   
    285. 
   
    286.     def _prepare_cursor(self, cursor):
   
    287.         """
   
    288.         Validate the connection is usable and perform database cursor wrapping.
   
   Local vars
   
   Variable Value self
   
   <DatabaseWrapper vendor='postgresql' alias='default'>

 * /usr/local/lib/python3.10/site-packages/django/utils/asyncio.py, line 26, in
   inner
   
    19.                 get_running_loop()
   
    20.             except RuntimeError:
   
    21.                 pass
   
    22.             else:
   
    23.                 if not os.environ.get("DJANGO_ALLOW_ASYNC_UNSAFE"):
   
    24.                     raise SynchronousOnlyOperation(message)
   
    25.             # Pass onward.
   
    26.             return func(*args, **kwargs)
        
        …
   
    27. 
   
    28.         return inner
   
    29. 
   
    30.     # If the message is actually a function, then be a no-arguments decorator.
   
    31.     if callable(message):
   
    32.         func = message
   
   Local vars
   
   Variable Value args
   
   (<DatabaseWrapper vendor='postgresql' alias='default'>,)
   
   func
   
   <function BaseDatabaseWrapper.connect at 0x7f5221217d90>
   
   kwargs
   
   {}
   
   message
   
   'You cannot call this from an async context - use a thread or sync_to_async.'

 * /usr/local/lib/python3.10/site-packages/django/db/backends/base/base.py, line
   263, in connect
   
    256.         self.close_at = None if max_age is None else time.monotonic() + max_age
   
    257.         self.closed_in_transaction = False
   
    258.         self.errors_occurred = False
   
    259.         # New connections are healthy.
   
    260.         self.health_check_done = True
   
    261.         # Establish the connection
   
    262.         conn_params = self.get_connection_params()
   
    263.         self.connection = self.get_new_connection(conn_params)
         
         …
   
    264.         self.set_autocommit(self.settings_dict["AUTOCOMMIT"])
   
    265.         self.init_connection_state()
   
    266.         connection_created.send(sender=self.__class__, connection=self)
   
    267. 
   
    268.         self.run_on_commit = []
   
    269. 
   
   Local vars
   
   Variable Value conn_params
   
   {'database': 'postgres', 'host': 'db', 'port': 5432, 'user': 'postgres'}
   
   max_age
   
   0
   
   self
   
   <DatabaseWrapper vendor='postgresql' alias='default'>

 * /usr/local/lib/python3.10/site-packages/django/utils/asyncio.py, line 26, in
   inner
   
    19.                 get_running_loop()
   
    20.             except RuntimeError:
   
    21.                 pass
   
    22.             else:
   
    23.                 if not os.environ.get("DJANGO_ALLOW_ASYNC_UNSAFE"):
   
    24.                     raise SynchronousOnlyOperation(message)
   
    25.             # Pass onward.
   
    26.             return func(*args, **kwargs)
        
        …
   
    27. 
   
    28.         return inner
   
    29. 
   
    30.     # If the message is actually a function, then be a no-arguments decorator.
   
    31.     if callable(message):
   
    32.         func = message
   
   Local vars
   
   Variable Value args
   
   (<DatabaseWrapper vendor='postgresql' alias='default'>,
    {'database': 'postgres', 'host': 'db', 'port': 5432, 'user': 'postgres'})
   
   func
   
   <function DatabaseWrapper.get_new_connection at 0x7f52210de680>
   
   kwargs
   
   {}
   
   message
   
   'You cannot call this from an async context - use a thread or sync_to_async.'

 * /usr/local/lib/python3.10/site-packages/django/db/backends/postgresql/base.py,
   line 215, in get_new_connection
   
    208.             conn_params["host"] = settings_dict["HOST"]
   
    209.         if settings_dict["PORT"]:
   
    210.             conn_params["port"] = settings_dict["PORT"]
   
    211.         return conn_params
   
    212. 
   
    213.     @async_unsafe
   
    214.     def get_new_connection(self, conn_params):
   
    215.         connection = Database.connect(**conn_params)
         
         …
   
    216. 
   
    217.         # self.isolation_level must be set:
   
    218.         # - after connecting to the database in order to obtain the database's
   
    219.         #   default when no value is explicitly specified in options.
   
    220.         # - before calling _set_autocommit() because if autocommit is on, that
   
    221.         #   will set connection.isolation_level to ISOLATION_LEVEL_AUTOCOMMIT.
   
   Local vars
   
   Variable Value conn_params
   
   {'database': 'postgres', 'host': 'db', 'port': 5432, 'user': 'postgres'}
   
   self
   
   <DatabaseWrapper vendor='postgresql' alias='default'>

 * /usr/local/lib/python3.10/site-packages/psycopg2/__init__.py, line 122, in
   connect
   
    115.     kwasync = {}
   
    116.     if 'async' in kwargs:
   
    117.         kwasync['async'] = kwargs.pop('async')
   
    118.     if 'async_' in kwargs:
   
    119.         kwasync['async_'] = kwargs.pop('async_')
   
    120. 
   
    121.     dsn = _ext.make_dsn(dsn, **kwargs)
   
    122.     conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
         
         …
   
    123.     if cursor_factory is not None:
   
    124.         conn.cursor_factory = cursor_factory
   
    125. 
   
    126.     return conn
   
   Local vars
   
   Variable Value connection_factory
   
   None
   
   cursor_factory
   
   None
   
   dsn
   
   'user=postgres host=db port=5432 dbname=postgres'
   
   kwargs
   
   {'database': 'postgres', 'host': 'db', 'port': 5432, 'user': 'postgres'}
   
   kwasync
   
   {}


 * THE ABOVE EXCEPTION (COULD NOT TRANSLATE HOST NAME "DB" TO ADDRESS: TEMPORARY
   FAILURE IN NAME RESOLUTION ) WAS THE DIRECT CAUSE OF THE FOLLOWING EXCEPTION:

 * /usr/local/lib/python3.10/site-packages/django/core/handlers/exception.py,
   line 56, in inner
   
    49. 
   
    50.         return inner
   
    51.     else:
   
    52. 
   
    53.         @wraps(get_response)
   
    54.         def inner(request):
   
    55.             try:
   
    56.                 response = get_response(request)
        
        …
   
    57.             except Exception as exc:
   
    58.                 response = response_for_exception(request, exc)
   
    59.             return response
   
    60. 
   
    61.         return inner
   
    62. 
   
   Local vars
   
   Variable Value exc
   
   OperationalError('could not translate host name "db" to address: Temporary failure in name resolution\n')
   
   get_response
   
   <bound method BaseHandler._get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x7f521ec72ec0>>
   
   request
   
   <WSGIRequest: GET '/'>

 * /usr/local/lib/python3.10/site-packages/django/core/handlers/base.py, line
   197, in _get_response
   
    190. 
   
    191.         if response is None:
   
    192.             wrapped_callback = self.make_view_atomic(callback)
   
    193.             # If it is an asynchronous view, run it in a subthread.
   
    194.             if asyncio.iscoroutinefunction(wrapped_callback):
   
    195.                 wrapped_callback = async_to_sync(wrapped_callback)
   
    196.             try:
   
    197.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)
         
         …
   
    198.             except Exception as e:
   
    199.                 response = self.process_exception_by_middleware(e, request)
   
    200.                 if response is None:
   
    201.                     raise
   
    202. 
   
    203.         # Complain if the view returned None (a common error).
   
   Local vars
   
   Variable Value callback
   
   <function serve at 0x7f521e5777f0>
   
   callback_args
   
   ('',)
   
   callback_kwargs
   
   {}
   
   middleware_method
   
   <bound method CsrfViewMiddleware.process_view of <CsrfViewMiddleware get_response=convert_exception_to_response.<locals>.inner>>
   
   request
   
   <WSGIRequest: GET '/'>
   
   response
   
   None
   
   self
   
   <django.core.handlers.wsgi.WSGIHandler object at 0x7f521ec72ec0>
   
   wrapped_callback
   
   <function serve at 0x7f521e5777f0>

 * /usr/local/lib/python3.10/site-packages/wagtail/views.py, line 14, in serve
   
    7.  from wagtail import hooks
   
    8.  from wagtail.forms import PasswordViewRestrictionForm
   
    9.  from wagtail.models import Page, PageViewRestriction, Site
   
    10. 
   
    11. 
   
    12. def serve(request, path):
   
    13.     # we need a valid Site object corresponding to this request in order to proceed
   
    14.     site = Site.find_for_request(request)
        
        …
   
    15.     if not site:
   
    16.         raise Http404
   
    17. 
   
    18.     path_components = [component for component in path.split("/") if component]
   
    19.     page, args, kwargs = site.root_page.localized.specific.route(
   
    20.         request, path_components
   
   Local vars
   
   Variable Value path
   
   ''
   
   request
   
   <WSGIRequest: GET '/'>

 * /usr/local/lib/python3.10/site-packages/wagtail/models/sites.py, line 150, in
   find_for_request
   
    143.         The site will be cached via request._wagtail_site
   
    144.         """
   
    145. 
   
    146.         if request is None:
   
    147.             return None
   
    148. 
   
    149.         if not hasattr(request, "_wagtail_site"):
   
    150.             site = Site._find_for_request(request)
         
         …
   
    151.             setattr(request, "_wagtail_site", site)
   
    152.         return request._wagtail_site
   
    153. 
   
    154.     @staticmethod
   
    155.     def _find_for_request(request):
   
    156.         hostname = split_domain_port(request.get_host())[0]
   
   Local vars
   
   Variable Value request
   
   <WSGIRequest: GET '/'>

 * /usr/local/lib/python3.10/site-packages/wagtail/models/sites.py, line 160, in
   _find_for_request
   
    153. 
   
    154.     @staticmethod
   
    155.     def _find_for_request(request):
   
    156.         hostname = split_domain_port(request.get_host())[0]
   
    157.         port = request.get_port()
   
    158.         site = None
   
    159.         try:
   
    160.             site = get_site_for_hostname(hostname, port)
         
         …
   
    161.         except Site.DoesNotExist:
   
    162.             pass
   
    163.             # copy old SiteMiddleware behaviour
   
    164.         return site
   
    165. 
   
    166.     @property
   
   Local vars
   
   Variable Value hostname
   
   'wagtail-demo.thelabnyc.com'
   
   port
   
   '8000'
   
   request
   
   <WSGIRequest: GET '/'>
   
   site
   
   None

 * /usr/local/lib/python3.10/site-packages/wagtail/models/sites.py, line 23, in
   get_site_for_hostname
   
    16. MATCH_HOSTNAME = 3
   
    17. 
   
    18. 
   
    19. def get_site_for_hostname(hostname, port):
   
    20.     """Return the wagtailcore.Site object for the given hostname and port."""
   
    21.     Site = apps.get_model("wagtailcore.Site")
   
    22. 
   
    23.     sites = list(
        
        …
   
    24.         Site.objects.annotate(
   
    25.             match=Case(
   
    26.                 # annotate the results by best choice descending
   
    27.                 # put exact hostname+port match first
   
    28.                 When(hostname=hostname, port=port, then=MATCH_HOSTNAME_PORT),
   
    29.                 # then put hostname+default (better than just hostname or just default)
   
   Local vars
   
   Variable Value Site
   
   <class 'wagtail.models.sites.Site'>
   
   hostname
   
   'wagtail-demo.thelabnyc.com'
   
   port
   
   '8000'

 * /usr/local/lib/python3.10/site-packages/django/db/models/query.py, line 394,
   in __iter__
   
    387.             2. sql.compiler.results_iter()
   
    388.                - Returns one row at time. At this point the rows are still just
   
    389.                  tuples. In some cases the return values are converted to
   
    390.                  Python values at this location.
   
    391.             3. self.iterator()
   
    392.                - Responsible for turning the rows into model objects.
   
    393.         """
   
    394.         self._fetch_all()
         
         …
   
    395.         return iter(self._result_cache)
   
    396. 
   
    397.     def __aiter__(self):
   
    398.         # Remember, __aiter__ itself is synchronous, it's the thing it returns
   
    399.         # that is async!
   
    400.         async def generator():
   
   Local vars
   
   Variable Value self
   
   Error in formatting: OperationalError: could not translate host name "db" to address: Temporary failure in name resolution
   

 * /usr/local/lib/python3.10/site-packages/django/db/models/query.py, line 1867,
   in _fetch_all
   
    1860.         c._known_related_objects = self._known_related_objects
   
    1861.         c._iterable_class = self._iterable_class
   
    1862.         c._fields = self._fields
   
    1863.         return c
   
    1864. 
   
    1865.     def _fetch_all(self):
   
    1866.         if self._result_cache is None:
   
    1867.             self._result_cache = list(self._iterable_class(self))
          
          …
   
    1868.         if self._prefetch_related_lookups and not self._prefetch_done:
   
    1869.             self._prefetch_related_objects()
   
    1870. 
   
    1871.     def _next_is_sticky(self):
   
    1872.         """
   
    1873.         Indicate that the next filter call and the one following that should
   
   Local vars
   
   Variable Value self
   
   Error in formatting: OperationalError: could not translate host name "db" to address: Temporary failure in name resolution
   

 * /usr/local/lib/python3.10/site-packages/django/db/models/query.py, line 87,
   in __iter__
   
    80. 
   
    81.     def __iter__(self):
   
    82.         queryset = self.queryset
   
    83.         db = queryset.db
   
    84.         compiler = queryset.query.get_compiler(using=db)
   
    85.         # Execute the query. This will also fill compiler.select, klass_info,
   
    86.         # and annotations.
   
    87.         results = compiler.execute_sql(
        
        …
   
    88.             chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size
   
    89.         )
   
    90.         select, klass_info, annotation_col_map = (
   
    91.             compiler.select,
   
    92.             compiler.klass_info,
   
    93.             compiler.annotation_col_map,
   
   Local vars
   
   Variable Value compiler
   
   <SQLCompiler model=Site connection=<DatabaseWrapper vendor='postgresql' alias='default'> using='default'>
   
   db
   
   'default'
   
   queryset
   
   Error in formatting: OperationalError: could not translate host name "db" to address: Temporary failure in name resolution
   
   
   self
   
   <django.db.models.query.ModelIterable object at 0x7f521e393dc0>

 * /usr/local/lib/python3.10/site-packages/django/db/models/sql/compiler.py,
   line 1396, in execute_sql
   
    1389.             if result_type == MULTI:
   
    1390.                 return iter([])
   
    1391.             else:
   
    1392.                 return
   
    1393.         if chunked_fetch:
   
    1394.             cursor = self.connection.chunked_cursor()
   
    1395.         else:
   
    1396.             cursor = self.connection.cursor()
          
          …
   
    1397.         try:
   
    1398.             cursor.execute(sql, params)
   
    1399.         except Exception:
   
    1400.             # Might fail for server-side cursors (e.g. connection closed)
   
    1401.             cursor.close()
   
    1402.             raise
   
   Local vars
   
   Variable Value chunk_size
   
   100
   
   chunked_fetch
   
   False
   
   params
   
   ('wagtail-demo.thelabnyc.com',
    8000,
    0,
    'wagtail-demo.thelabnyc.com',
    1,
    2,
    3,
    'wagtail-demo.thelabnyc.com')
   
   result_type
   
   'multi'
   
   self
   
   <SQLCompiler model=Site connection=<DatabaseWrapper vendor='postgresql' alias='default'> using='default'>
   
   sql
   
   ('SELECT "wagtailcore_site"."id", "wagtailcore_site"."hostname", '
    '"wagtailcore_site"."port", "wagtailcore_site"."site_name", '
    '"wagtailcore_site"."root_page_id", "wagtailcore_site"."is_default_site", '
    'CASE WHEN ("wagtailcore_site"."hostname" = %s AND "wagtailcore_site"."port" '
    '= %s) THEN %s WHEN ("wagtailcore_site"."hostname" = %s AND '
    '"wagtailcore_site"."is_default_site") THEN %s WHEN '
    '"wagtailcore_site"."is_default_site" THEN %s ELSE %s END AS "match", '
    '"wagtailcore_page"."id", "wagtailcore_page"."path", '
    '"wagtailcore_page"."depth", "wagtailcore_page"."numchild", '
    '"wagtailcore_page"."translation_key", "wagtailcore_page"."locale_id", '
    '"wagtailcore_page"."latest_revision_id", "wagtailcore_page"."live", '
    '"wagtailcore_page"."has_unpublished_changes", '
    '"wagtailcore_page"."first_published_at", '
    '"wagtailcore_page"."last_published_at", '
    '"wagtailcore_page"."live_revision_id", "wagtailcore_page"."go_live_at", '
    '"wagtailcore_page"."expire_at", "wagtailcore_page"."expired", '
    '"wagtailcore_page"."locked", "wagtailcore_page"."locked_at", '
    '"wagtailcore_page"."locked_by_id", "wagtailcore_page"."title", '
    '"wagtailcore_page"."draft_title", "wagtailcore_page"."slug", '
    '"wagtailcore_page"."content_type_id", "wagtailcore_page"."url_path", '
    '"wagtailcore_page"."owner_id", "wagtailcore_page"."seo_title", '
    '"wagtailcore_page"."show_in_menus", "wagtailcore_page"."search_description", '
    '"wagtailcore_page"."latest_revision_created_at", '
    '"wagtailcore_page"."alias_of_id" FROM "wagtailcore_site" INNER JOIN '
    '"wagtailcore_page" ON ("wagtailcore_site"."root_page_id" = '
    '"wagtailcore_page"."id") WHERE ("wagtailcore_site"."hostname" = %s OR '
    '"wagtailcore_site"."is_default_site") ORDER BY "match" ASC')

 * /usr/local/lib/python3.10/site-packages/django/utils/asyncio.py, line 26, in
   inner
   
    19.                 get_running_loop()
   
    20.             except RuntimeError:
   
    21.                 pass
   
    22.             else:
   
    23.                 if not os.environ.get("DJANGO_ALLOW_ASYNC_UNSAFE"):
   
    24.                     raise SynchronousOnlyOperation(message)
   
    25.             # Pass onward.
   
    26.             return func(*args, **kwargs)
        
        …
   
    27. 
   
    28.         return inner
   
    29. 
   
    30.     # If the message is actually a function, then be a no-arguments decorator.
   
    31.     if callable(message):
   
    32.         func = message
   
   Local vars
   
   Variable Value args
   
   (<DatabaseWrapper vendor='postgresql' alias='default'>,)
   
   func
   
   <function BaseDatabaseWrapper.cursor at 0x7f522122c3a0>
   
   kwargs
   
   {}
   
   message
   
   'You cannot call this from an async context - use a thread or sync_to_async.'

 * /usr/local/lib/python3.10/site-packages/django/db/backends/base/base.py, line
   323, in cursor
   
    316.                 return self.connection.close()
   
    317. 
   
    318.     # ##### Generic wrappers for PEP-249 connection methods #####
   
    319. 
   
    320.     @async_unsafe
   
    321.     def cursor(self):
   
    322.         """Create a cursor, opening a connection if necessary."""
   
    323.         return self._cursor()
         
         …
   
    324. 
   
    325.     @async_unsafe
   
    326.     def commit(self):
   
    327.         """Commit a transaction and reset the dirty flag."""
   
    328.         self.validate_thread_sharing()
   
    329.         self.validate_no_atomic_block()
   
   Local vars
   
   Variable Value self
   
   <DatabaseWrapper vendor='postgresql' alias='default'>

 * /usr/local/lib/python3.10/site-packages/django/db/backends/base/base.py, line
   299, in _cursor
   
    292.             wrapped_cursor = self.make_debug_cursor(cursor)
   
    293.         else:
   
    294.             wrapped_cursor = self.make_cursor(cursor)
   
    295.         return wrapped_cursor
   
    296. 
   
    297.     def _cursor(self, name=None):
   
    298.         self.close_if_health_check_failed()
   
    299.         self.ensure_connection()
         
         …
   
    300.         with self.wrap_database_errors:
   
    301.             return self._prepare_cursor(self.create_cursor(name))
   
    302. 
   
    303.     def _commit(self):
   
    304.         if self.connection is not None:
   
    305.             with self.wrap_database_errors:
   
   Local vars
   
   Variable Value name
   
   None
   
   self
   
   <DatabaseWrapper vendor='postgresql' alias='default'>

 * /usr/local/lib/python3.10/site-packages/django/utils/asyncio.py, line 26, in
   inner
   
    19.                 get_running_loop()
   
    20.             except RuntimeError:
   
    21.                 pass
   
    22.             else:
   
    23.                 if not os.environ.get("DJANGO_ALLOW_ASYNC_UNSAFE"):
   
    24.                     raise SynchronousOnlyOperation(message)
   
    25.             # Pass onward.
   
    26.             return func(*args, **kwargs)
        
        …
   
    27. 
   
    28.         return inner
   
    29. 
   
    30.     # If the message is actually a function, then be a no-arguments decorator.
   
    31.     if callable(message):
   
    32.         func = message
   
   Local vars
   
   Variable Value args
   
   (<DatabaseWrapper vendor='postgresql' alias='default'>,)
   
   func
   
   <function BaseDatabaseWrapper.ensure_connection at 0x7f5221217f40>
   
   kwargs
   
   {}
   
   message
   
   'You cannot call this from an async context - use a thread or sync_to_async.'

 * /usr/local/lib/python3.10/site-packages/django/db/backends/base/base.py, line
   281, in ensure_connection
   
    274.                 % self.alias
   
    275.             )
   
    276. 
   
    277.     @async_unsafe
   
    278.     def ensure_connection(self):
   
    279.         """Guarantee that a connection to the database is established."""
   
    280.         if self.connection is None:
   
    281.             with self.wrap_database_errors:
         
         …
   
    282.                 self.connect()
   
    283. 
   
    284.     # ##### Backend-specific wrappers for PEP-249 connection methods #####
   
    285. 
   
    286.     def _prepare_cursor(self, cursor):
   
    287.         """
   
   Local vars
   
   Variable Value self
   
   <DatabaseWrapper vendor='postgresql' alias='default'>

 * /usr/local/lib/python3.10/site-packages/django/db/utils.py, line 91, in
   __exit__
   
    84.             db_exc_type = getattr(self.wrapper.Database, dj_exc_type.__name__)
   
    85.             if issubclass(exc_type, db_exc_type):
   
    86.                 dj_exc_value = dj_exc_type(*exc_value.args)
   
    87.                 # Only set the 'errors_occurred' flag for errors that may make
   
    88.                 # the connection unusable.
   
    89.                 if dj_exc_type not in (DataError, IntegrityError):
   
    90.                     self.wrapper.errors_occurred = True
   
    91.                 raise dj_exc_value.with_traceback(traceback) from exc_value
        
        …
   
    92. 
   
    93.     def __call__(self, func):
   
    94.         # Note that we are intentionally not using @wraps here for performance
   
    95.         # reasons. Refs #21109.
   
    96.         def inner(*args, **kwargs):
   
    97.             with self:
   
   Local vars
   
   Variable Value db_exc_type
   
   <class 'psycopg2.OperationalError'>
   
   dj_exc_type
   
   <class 'django.db.utils.OperationalError'>
   
   dj_exc_value
   
   OperationalError('could not translate host name "db" to address: Temporary failure in name resolution\n')
   
   exc_type
   
   <class 'psycopg2.OperationalError'>
   
   exc_value
   
   OperationalError('could not translate host name "db" to address: Temporary failure in name resolution\n')
   
   self
   
   <django.db.utils.DatabaseErrorWrapper object at 0x7f521e597b20>
   
   traceback
   
   <traceback object at 0x7f521e3bc240>

 * /usr/local/lib/python3.10/site-packages/django/db/backends/base/base.py, line
   282, in ensure_connection
   
    275.             )
   
    276. 
   
    277.     @async_unsafe
   
    278.     def ensure_connection(self):
   
    279.         """Guarantee that a connection to the database is established."""
   
    280.         if self.connection is None:
   
    281.             with self.wrap_database_errors:
   
    282.                 self.connect()
         
         …
   
    283. 
   
    284.     # ##### Backend-specific wrappers for PEP-249 connection methods #####
   
    285. 
   
    286.     def _prepare_cursor(self, cursor):
   
    287.         """
   
    288.         Validate the connection is usable and perform database cursor wrapping.
   
   Local vars
   
   Variable Value self
   
   <DatabaseWrapper vendor='postgresql' alias='default'>

 * /usr/local/lib/python3.10/site-packages/django/utils/asyncio.py, line 26, in
   inner
   
    19.                 get_running_loop()
   
    20.             except RuntimeError:
   
    21.                 pass
   
    22.             else:
   
    23.                 if not os.environ.get("DJANGO_ALLOW_ASYNC_UNSAFE"):
   
    24.                     raise SynchronousOnlyOperation(message)
   
    25.             # Pass onward.
   
    26.             return func(*args, **kwargs)
        
        …
   
    27. 
   
    28.         return inner
   
    29. 
   
    30.     # If the message is actually a function, then be a no-arguments decorator.
   
    31.     if callable(message):
   
    32.         func = message
   
   Local vars
   
   Variable Value args
   
   (<DatabaseWrapper vendor='postgresql' alias='default'>,)
   
   func
   
   <function BaseDatabaseWrapper.connect at 0x7f5221217d90>
   
   kwargs
   
   {}
   
   message
   
   'You cannot call this from an async context - use a thread or sync_to_async.'

 * /usr/local/lib/python3.10/site-packages/django/db/backends/base/base.py, line
   263, in connect
   
    256.         self.close_at = None if max_age is None else time.monotonic() + max_age
   
    257.         self.closed_in_transaction = False
   
    258.         self.errors_occurred = False
   
    259.         # New connections are healthy.
   
    260.         self.health_check_done = True
   
    261.         # Establish the connection
   
    262.         conn_params = self.get_connection_params()
   
    263.         self.connection = self.get_new_connection(conn_params)
         
         …
   
    264.         self.set_autocommit(self.settings_dict["AUTOCOMMIT"])
   
    265.         self.init_connection_state()
   
    266.         connection_created.send(sender=self.__class__, connection=self)
   
    267. 
   
    268.         self.run_on_commit = []
   
    269. 
   
   Local vars
   
   Variable Value conn_params
   
   {'database': 'postgres', 'host': 'db', 'port': 5432, 'user': 'postgres'}
   
   max_age
   
   0
   
   self
   
   <DatabaseWrapper vendor='postgresql' alias='default'>

 * /usr/local/lib/python3.10/site-packages/django/utils/asyncio.py, line 26, in
   inner
   
    19.                 get_running_loop()
   
    20.             except RuntimeError:
   
    21.                 pass
   
    22.             else:
   
    23.                 if not os.environ.get("DJANGO_ALLOW_ASYNC_UNSAFE"):
   
    24.                     raise SynchronousOnlyOperation(message)
   
    25.             # Pass onward.
   
    26.             return func(*args, **kwargs)
        
        …
   
    27. 
   
    28.         return inner
   
    29. 
   
    30.     # If the message is actually a function, then be a no-arguments decorator.
   
    31.     if callable(message):
   
    32.         func = message
   
   Local vars
   
   Variable Value args
   
   (<DatabaseWrapper vendor='postgresql' alias='default'>,
    {'database': 'postgres', 'host': 'db', 'port': 5432, 'user': 'postgres'})
   
   func
   
   <function DatabaseWrapper.get_new_connection at 0x7f52210de680>
   
   kwargs
   
   {}
   
   message
   
   'You cannot call this from an async context - use a thread or sync_to_async.'

 * /usr/local/lib/python3.10/site-packages/django/db/backends/postgresql/base.py,
   line 215, in get_new_connection
   
    208.             conn_params["host"] = settings_dict["HOST"]
   
    209.         if settings_dict["PORT"]:
   
    210.             conn_params["port"] = settings_dict["PORT"]
   
    211.         return conn_params
   
    212. 
   
    213.     @async_unsafe
   
    214.     def get_new_connection(self, conn_params):
   
    215.         connection = Database.connect(**conn_params)
         
         …
   
    216. 
   
    217.         # self.isolation_level must be set:
   
    218.         # - after connecting to the database in order to obtain the database's
   
    219.         #   default when no value is explicitly specified in options.
   
    220.         # - before calling _set_autocommit() because if autocommit is on, that
   
    221.         #   will set connection.isolation_level to ISOLATION_LEVEL_AUTOCOMMIT.
   
   Local vars
   
   Variable Value conn_params
   
   {'database': 'postgres', 'host': 'db', 'port': 5432, 'user': 'postgres'}
   
   self
   
   <DatabaseWrapper vendor='postgresql' alias='default'>

 * /usr/local/lib/python3.10/site-packages/psycopg2/__init__.py, line 122, in
   connect
   
    115.     kwasync = {}
   
    116.     if 'async' in kwargs:
   
    117.         kwasync['async'] = kwargs.pop('async')
   
    118.     if 'async_' in kwargs:
   
    119.         kwasync['async_'] = kwargs.pop('async_')
   
    120. 
   
    121.     dsn = _ext.make_dsn(dsn, **kwargs)
   
    122.     conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
         
         …
   
    123.     if cursor_factory is not None:
   
    124.         conn.cursor_factory = cursor_factory
   
    125. 
   
    126.     return conn
   
   Local vars
   
   Variable Value connection_factory
   
   None
   
   cursor_factory
   
   None
   
   dsn
   
   'user=postgres host=db port=5432 dbname=postgres'
   
   kwargs
   
   {'database': 'postgres', 'host': 'db', 'port': 5432, 'user': 'postgres'}
   
   kwasync
   
   {}

Environment: Request Method: GET Request URL:
https://wagtail-demo.thelabnyc.com/ Django Version: 4.1.7 Python Version: 3.10.9
Installed Applications: ['django.contrib.admin', 'django.contrib.auth',
'django.contrib.contenttypes', 'django.contrib.sessions',
'django.contrib.messages', 'django.contrib.staticfiles',
'django.contrib.sitemaps', 'thelabui', 'reactivated', 'wagtail.contrib.forms',
'wagtail.contrib.redirects', 'wagtail.contrib.modeladmin',
'wagtail.contrib.settings', 'wagtail.contrib.routable_page',
'wagtail.contrib.styleguide', 'wagtail.contrib.frontend_cache',
'wagtail.contrib.table_block', 'wagtail.embeds', 'wagtail.sites',
'wagtail.users', 'wagtail.snippets', 'wagtail.documents', 'wagtail.images',
'wagtail.search', 'wagtail.admin', 'wagtail', 'modelcluster', 'taggit',
'wagtailvideos', 'server.cms'] Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
'thelabui.middleware.TuneCacheHeadersMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'wagtail.contrib.redirects.middleware.RedirectMiddleware',
'thelabui.middleware.XForwardedForMiddleware',
'thelabui.middleware.XRobotsMiddleware'] Traceback (most recent call last): File
"/usr/local/lib/python3.10/site-packages/django/db/backends/base/base.py", line
282, in ensure_connection self.connect() File
"/usr/local/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in
inner return func(*args, **kwargs) File
"/usr/local/lib/python3.10/site-packages/django/db/backends/base/base.py", line
263, in connect self.connection = self.get_new_connection(conn_params) File
"/usr/local/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in
inner return func(*args, **kwargs) File
"/usr/local/lib/python3.10/site-packages/django/db/backends/postgresql/base.py",
line 215, in get_new_connection connection = Database.connect(**conn_params)
File "/usr/local/lib/python3.10/site-packages/psycopg2/__init__.py", line 122,
in connect conn = _connect(dsn, connection_factory=connection_factory,
**kwasync) The above exception (could not translate host name "db" to address:
Temporary failure in name resolution ) was the direct cause of the following
exception: File
"/usr/local/lib/python3.10/site-packages/django/core/handlers/exception.py",
line 56, in inner response = get_response(request) File
"/usr/local/lib/python3.10/site-packages/django/core/handlers/base.py", line
197, in _get_response response = wrapped_callback(request, *callback_args,
**callback_kwargs) File
"/usr/local/lib/python3.10/site-packages/wagtail/views.py", line 14, in serve
site = Site.find_for_request(request) File
"/usr/local/lib/python3.10/site-packages/wagtail/models/sites.py", line 150, in
find_for_request site = Site._find_for_request(request) File
"/usr/local/lib/python3.10/site-packages/wagtail/models/sites.py", line 160, in
_find_for_request site = get_site_for_hostname(hostname, port) File
"/usr/local/lib/python3.10/site-packages/wagtail/models/sites.py", line 23, in
get_site_for_hostname sites = list( File
"/usr/local/lib/python3.10/site-packages/django/db/models/query.py", line 394,
in __iter__ self._fetch_all() File
"/usr/local/lib/python3.10/site-packages/django/db/models/query.py", line 1867,
in _fetch_all self._result_cache = list(self._iterable_class(self)) File
"/usr/local/lib/python3.10/site-packages/django/db/models/query.py", line 87, in
__iter__ results = compiler.execute_sql( File
"/usr/local/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line
1396, in execute_sql cursor = self.connection.cursor() File
"/usr/local/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in
inner return func(*args, **kwargs) File
"/usr/local/lib/python3.10/site-packages/django/db/backends/base/base.py", line
323, in cursor return self._cursor() File
"/usr/local/lib/python3.10/site-packages/django/db/backends/base/base.py", line
299, in _cursor self.ensure_connection() File
"/usr/local/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in
inner return func(*args, **kwargs) File
"/usr/local/lib/python3.10/site-packages/django/db/backends/base/base.py", line
281, in ensure_connection with self.wrap_database_errors: File
"/usr/local/lib/python3.10/site-packages/django/db/utils.py", line 91, in
__exit__ raise dj_exc_value.with_traceback(traceback) from exc_value File
"/usr/local/lib/python3.10/site-packages/django/db/backends/base/base.py", line
282, in ensure_connection self.connect() File
"/usr/local/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in
inner return func(*args, **kwargs) File
"/usr/local/lib/python3.10/site-packages/django/db/backends/base/base.py", line
263, in connect self.connection = self.get_new_connection(conn_params) File
"/usr/local/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in
inner return func(*args, **kwargs) File
"/usr/local/lib/python3.10/site-packages/django/db/backends/postgresql/base.py",
line 215, in get_new_connection connection = Database.connect(**conn_params)
File "/usr/local/lib/python3.10/site-packages/psycopg2/__init__.py", line 122,
in connect conn = _connect(dsn, connection_factory=connection_factory,
**kwasync) Exception Type: OperationalError at / Exception Value: could not
translate host name "db" to address: Temporary failure in name resolution




REQUEST INFORMATION


USER

AnonymousUser


GET

No GET data


POST

No POST data


FILES

No FILES data


COOKIES

No cookie data


META

Variable Value HTTP_ACCEPT

'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7'

HTTP_ACCEPT_ENCODING

'gzip, deflate, br'

HTTP_ACCEPT_LANGUAGE

'de-DE,de;q=0.9'

HTTP_CACHE_CONTROL

'no-cache'

HTTP_CONNECTION

'close'

HTTP_HOST

'wagtail-demo.thelabnyc.com'

HTTP_PRAGMA

'no-cache'

HTTP_SEC_FETCH_DEST

'document'

HTTP_SEC_FETCH_MODE

'navigate'

HTTP_SEC_FETCH_SITE

'none'

HTTP_SEC_FETCH_USER

'?1'

HTTP_UPGRADE_INSECURE_REQUESTS

'1'

HTTP_USER_AGENT

('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like '
 'Gecko) Chrome/111.0.5563.110 Safari/537.36')

HTTP_X_FORWARDED_PROTO

'https'

PATH_INFO

'/'

QUERY_STRING

''

REMOTE_ADDR

'172.18.0.1'

REMOTE_PORT

'3237'

REQUEST_METHOD

'GET'

REQUEST_URI

'/'

SCRIPT_NAME

''

SERVER_NAME

'988b233a582e'

SERVER_PORT

'8000'

SERVER_PROTOCOL

'HTTP/1.0'

UWSGI_ROUTER

'http'

uwsgi.node

b'988b233a582e'

uwsgi.version

b'2.0.21'

wsgi.errors

<_io.TextIOWrapper name=2 mode='w' encoding='UTF-8'>

wsgi.file_wrapper

<built-in function uwsgi_sendfile>

wsgi.input

<uwsgi._Input object at 0x7f521e5f3c50>

wsgi.multiprocess

True

wsgi.multithread

False

wsgi.run_once

False

wsgi.url_scheme

'https'

wsgi.version

(1, 0)


SETTINGS

USING SETTINGS MODULE SERVER.SETTINGS

Setting Value ABSOLUTE_URL_OVERRIDES

{}

ADMINS

[]

ALLOWED_HOSTS

['*']

APPEND_SLASH

True

AUTHENTICATION_BACKENDS

['django.contrib.auth.backends.ModelBackend']

AUTH_PASSWORD_VALIDATORS

'********************'

AUTH_USER_MODEL

'auth.User'

AWS_S3_CUSTOM_DOMAIN

None

AWS_STORAGE_BUCKET_NAME

None

BASE_DIR

PosixPath('/app')

CACHES

{'default': {'BACKEND': 'django_redis.cache.RedisCache',
             'KEY_PREFIX': '********************',
             'LOCATION': 'redis://redis:6379/0',
             'OPTIONS': {'COMPRESSOR': 'django_redis.compressors.zlib.ZlibCompressor',
                         'CONNECTION_POOL_CLASS': 'redis.BlockingConnectionPool',
                         'CONNECTION_POOL_KWARGS': {'max_connections': 50,
                                                    'timeout': 20},
                         'PARSER_CLASS': 'redis.connection.HiredisParser'}}}

CACHE_MIDDLEWARE_ALIAS

'default'

CACHE_MIDDLEWARE_KEY_PREFIX

'********************'

CACHE_MIDDLEWARE_SECONDS

600

CI_COMMIT_REF_SLUG

'master'

CI_COMMIT_SHA

'aae5a69ba59a5ce1c9986f3628d6c793009d3178'

CSP_BASE_URI

["'self'"]

CSP_CONNECT_SRC

["'self'"]

CSP_DEFAULT_SRC

["'none'"]

CSP_FONT_SRC

["'self'"]

CSP_FORM_ACTION

["'self'"]

CSP_FRAME_ANCESTORS

["'self'"]

CSP_FRAME_SRC

["'self'"]

CSP_IMG_SRC

["'self'", 'data:']

CSP_INCLUDE_NONCE_IN

['script-src']

CSP_MEDIA_SRC

["'self'"]

CSP_OBJECT_SRC

["'self'"]

CSP_SCRIPT_SRC

["'self'"]

CSP_STYLE_SRC

["'self'", "'unsafe-inline'"]

CSRF_COOKIE_AGE

31449600

CSRF_COOKIE_DOMAIN

None

CSRF_COOKIE_HTTPONLY

True

CSRF_COOKIE_MASKED

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_HEALTH_CHECKS': False,
             'CONN_MAX_AGE': 0,
             'ENGINE': 'django.db.backends.postgresql',
             'HOST': 'db',
             'NAME': 'postgres',
             'OPTIONS': {},
             'PASSWORD': '********************',
             'PORT': 5432,
             'TEST': {'CHARSET': None,
                      'COLLATION': None,
                      'MIGRATE': True,
                      'MIRROR': None,
                      'NAME': None},
             'TIME_ZONE': None,
             'USER': 'postgres'}}

DATABASE_ROUTERS

[]

DATA_UPLOAD_MAX_MEMORY_SIZE

2621440

DATA_UPLOAD_MAX_NUMBER_FIELDS

1000

DATA_UPLOAD_MAX_NUMBER_FILES

100

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']

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

'noreply@thelabnyc.com'

DEFAULT_INDEX_TABLESPACE

''

DEFAULT_TABLESPACE

''

DISALLOWED_USER_AGENTS

[]

EMAIL_BACKEND

'django.core.mail.backends.console.EmailBackend'

EMAIL_HOST

'localhost'

EMAIL_HOST_PASSWORD

'********************'

EMAIL_HOST_USER

''

EMAIL_PORT

25

EMAIL_SSL_CERTFILE

None

EMAIL_SSL_KEYFILE

'********************'

EMAIL_SUBJECT_PREFIX

'[Django] '

EMAIL_TIMEOUT

None

EMAIL_USE_LOCALTIME

False

EMAIL_USE_SSL

False

EMAIL_USE_TLS

False

ENVIRONMENT

'localdev'

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'

IGNORABLE_404_URLS

[]

INSTALLED_APPS

['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.sitemaps',
 'thelabui',
 'reactivated',
 'wagtail.contrib.forms',
 'wagtail.contrib.redirects',
 'wagtail.contrib.modeladmin',
 'wagtail.contrib.settings',
 'wagtail.contrib.routable_page',
 'wagtail.contrib.styleguide',
 'wagtail.contrib.frontend_cache',
 'wagtail.contrib.table_block',
 'wagtail.embeds',
 'wagtail.sites',
 'wagtail.users',
 'wagtail.snippets',
 'wagtail.documents',
 'wagtail.images',
 'wagtail.search',
 'wagtail.admin',
 'wagtail',
 'modelcluster',
 'taggit',
 'wagtailvideos',
 'server.cms']

INTERNAL_IPS

[]

IPWARE_META_PRECEDENCE_ORDER

('HTTP_X_FORWARDED_FOR', 'X_FORWARDED_FOR', 'REMOTE_ADDR')

IS_MANAGE_CMD

False

IS_UNIT_TEST

False

LABUI_IS_PROD

False

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'),
 ('ms', 'Malay'),
 ('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

'en-us'

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

{}

LOGGING_CONFIG

'logging.config.dictConfig'

LOGIN_REDIRECT_URL

'/accounts/profile/'

LOGIN_URL

'/accounts/login/'

LOGOUT_REDIRECT_URL

None

MANAGERS

[]

MEDIA_ROOT

PosixPath('/app/media')

MEDIA_URL

'/media/'

MESSAGE_STORAGE

'django.contrib.messages.storage.fallback.FallbackStorage'

MIDDLEWARE

['django.middleware.security.SecurityMiddleware',
 'whitenoise.middleware.WhiteNoiseMiddleware',
 'thelabui.middleware.TuneCacheHeadersMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'wagtail.contrib.redirects.middleware.RedirectMiddleware',
 'thelabui.middleware.XForwardedForMiddleware',
 'thelabui.middleware.XRobotsMiddleware']

MIGRATION_MODULES

{}

MONTH_DAY_FORMAT

'F j'

NUMBER_GROUPING

0

PASSWORD_HASHERS

'********************'

PASSWORD_RESET_TIMEOUT

'********************'

PHONENUMBER_DEFAULT_REGION

'US'

PREPEND_WWW

False

REDIS_URL

'redis://redis:6379/0'

ROOT_URLCONF

'server.urls'

SECRET_KEY

'********************'

SECRET_KEY_FALLBACKS

'********************'

SECURE_CONTENT_TYPE_NOSNIFF

True

SECURE_CROSS_ORIGIN_OPENER_POLICY

'same-origin'

SECURE_HSTS_INCLUDE_SUBDOMAINS

False

SECURE_HSTS_PRELOAD

False

SECURE_HSTS_SECONDS

0

SECURE_PROXY_SSL_HEADER

('HTTP_X_FORWARDED_PROTO', 'https')

SECURE_REDIRECT_EXEMPT

[]

SECURE_REFERRER_POLICY

'strict-origin-when-cross-origin'

SECURE_SSL_HOST

None

SECURE_SSL_REDIRECT

False

SERVER_EMAIL

'root@localhost'

SESSION_CACHE_ALIAS

'default'

SESSION_COOKIE_AGE

1209600

SESSION_COOKIE_DOMAIN

None

SESSION_COOKIE_HTTPONLY

True

SESSION_COOKIE_NAME

'sessionid'

SESSION_COOKIE_PATH

'/'

SESSION_COOKIE_SAMESITE

'Lax'

SESSION_COOKIE_SECURE

False

SESSION_ENGINE

'django.contrib.sessions.backends.cache'

SESSION_EXPIRE_AT_BROWSER_CLOSE

False

SESSION_FILE_PATH

None

SESSION_SAVE_EVERY_REQUEST

False

SESSION_SERIALIZER

'django.contrib.sessions.serializers.JSONSerializer'

SETTINGS_MODULE

'server.settings'

SHORT_DATETIME_FORMAT

'm/d/Y P'

SHORT_DATE_FORMAT

'm/d/Y'

SIGNING_BACKEND

'django.core.signing.TimestampSigner'

SILENCED_SYSTEM_CHECKS

[]

STATICFILES_DIRS

[PosixPath('/app/static')]

STATICFILES_FINDERS

['django.contrib.staticfiles.finders.FileSystemFinder',
 'django.contrib.staticfiles.finders.AppDirectoriesFinder']

STATICFILES_STORAGE

'whitenoise.storage.CompressedManifestStaticFilesStorage'

STATIC_ROOT

PosixPath('/app/collected')

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',
                                     'server.cms.context_processors.core_assets',
                                     'server.cms.context_processors.page_chrome']}},
 {'APP_DIRS': True,
  'BACKEND': 'reactivated.backend.JSX',
  'DIRS': [],
  'OPTIONS': {'context_processors': ['django.contrib.messages.context_processors.messages',
                                     'django.template.context_processors.csrf',
                                     'django.template.context_processors.request',
                                     'django.template.context_processors.static',
                                     'server.cms.context_processors.core_assets',
                                     'server.cms.context_processors.page_chrome']}}]

TEST_NON_SERIALIZED_APPS

[]

TEST_RUNNER

'snapshottest.django.TestRunner'

THOUSAND_SEPARATOR

','

TIME_FORMAT

'P'

TIME_INPUT_FORMATS

['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']

TIME_ZONE

'UTC'

USE_DEPRECATED_PYTZ

False

USE_I18N

True

USE_L10N

True

USE_THOUSAND_SEPARATOR

False

USE_TZ

True

USE_X_FORWARDED_HOST

False

USE_X_FORWARDED_PORT

True

WAGTAILADMIN_BASE_URL

'https://wagtail-demo.thelabnyc.com'

WAGTAILDOCS_SERVE_METHOD

'direct'

WAGTAIL_GRAVATAR_PROVIDER_URL

None

WAGTAIL_SITE_NAME

'thelab-ui Bakery'

WSGI_APPLICATION

'server.wsgi.application'

X_FRAME_OPTIONS

'DENY'

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.