Open spiceworm opened 1 month ago
@spiceworm Do you use string_if_invalid
? I believe it's why you are getting this exception.
I'd recommend you not to use it. More details you can get in Adam's blogpost https://adamj.eu/tech/2022/03/30/how-to-make-django-error-for-undefined-template-variables/#with-the-string-if-invalid-option
I am not using string_if_invalid
. See example in https://github.com/jazzband/django-constance/pull/587#issuecomment-2359180091
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