You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'fieldsets' and 'subtitle' are missing from template context which results in VariableDoesNotExist exceptions. fieldsets will only be missing if settings.CONFIG_FIELDSETS is falsy. I verified this is the problem by adding title=None, fieldsets=[] to context and it stop the exceptions from being thrown.
Steps to reproduce
Run django app with log level set to DEBUG and navigate to /admin/constance/config/
DEBUG 2024-09-14 02:57:31,496 base 471 128195625114496 Exception while resolving variable 'subtitle' in template 'admin/constance/change_list.html'.
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/django/template/base.py", line 883, in _resolve_lookup
current = current[bit]
~~~~~~~^^^^^
File "/usr/local/lib/python3.12/site-packages/django/template/context.py", line 85, in __getitem__
raise KeyError(key)
KeyError: 'subtitle'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/django/template/base.py", line 889, in _resolve_lookup
if isinstance(current, BaseContext) and getattr(
^^^^^^^^
AttributeError: type object 'RequestContext' has no attribute 'subtitle'
[2024-09-14 02:58:37 +0000] [500] [DEBUG] GET /admin/constance/config/
DEBUG 2024-09-14 02:58:37,761 base 500 140439392750464 Exception while resolving variable 'fieldsets' in template 'admin/constance/change_list.html'.
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/django/template/base.py", line 883, in _resolve_lookup
current = current[bit]
~~~~~~~^^^^^
File "/usr/local/lib/python3.12/site-packages/django/template/context.py", line 85, in __getitem__
raise KeyError(key)
KeyError: 'fieldsets'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/django/template/base.py", line 889, in _resolve_lookup
if isinstance(current, BaseContext) and getattr(
^^^^^^^^
AttributeError: type object 'RequestContext' has no attribute 'fieldsets'
System configuration
Django version: 5.1.1
Python version: 3.12.6
Django-Constance version: 4.1.1
The text was updated successfully, but these errors were encountered:
Describe the problem
'fieldsets' and 'subtitle' are missing from template context which results in
VariableDoesNotExist
exceptions.fieldsets
will only be missing ifsettings.CONFIG_FIELDSETS
is falsy. I verified this is the problem by addingtitle=None, fieldsets=[]
tocontext
and it stop the exceptions from being thrown.Steps to reproduce
Run django app with log level set to DEBUG and navigate to /admin/constance/config/
System configuration
The text was updated successfully, but these errors were encountered: