#31865: Missing variable in admin template
---------------------------------------------+------------------------
Reporter: Christian Ullrich | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 3.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------------+------------------------
The `admin/nav_sidebar.html` template appears to be missing an assignment
to `show_changelinks` where it includes `app_list.html`:
{{{
{% include 'admin/app_list.html' with app_list=available_apps %}
}}}
This leads to megabytes of log spam for every admin page visited with the
sidebar on:
{{{
2020-08-07 09:06:49,882 [DEBUG ] (django.template) Exception while
resolving variable 'show_changelinks' in template
'admin/change_list.html'.
Traceback (most recent call last):
File "[python]\lib\site-packages\django\template\base.py", line 829, in
_resolve_lookup
current = current[bit]
File "[python]\lib\site-packages\django\template\context.py", line 83,
in __getitem__
raise KeyError(key)
KeyError: 'show_changelinks'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "[python]\lib\site-packages\django\template\base.py", line 835, in
_resolve_lookup
if isinstance(current, BaseContext) and getattr(type(current), bit):
AttributeError: type object 'RequestContext' has no attribute
'show_changelinks'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "[python]\lib\site-packages\django\template\base.py", line 843, in
_resolve_lookup
current = current[int(bit)]
ValueError: invalid literal for int() with base 10: 'show_changelinks'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "[python]\lib\site-packages\django\template\base.py", line 848, in
_resolve_lookup
raise VariableDoesNotExist("Failed lookup for key "
django.template.base.VariableDoesNotExist: Failed lookup for key
[show_changelinks] in [{'True': True, 'False': False, 'None': None},}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31865>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/053.8c1f426156346e3a3f4bfeea3f6fc956%40djangoproject.com.