#10275: Inconsistency between django.contrib.admin.models.LogEntry interface and
index.html admin template
----------------------------------+-----------------------------------------
Reporter: zgoda | Owner: nobody
Status: new | Milestone:
Component: django.contrib.admin | Version: SVN
Keywords: log | Stage: Unreviewed
Has_patch: 0 |
----------------------------------+-----------------------------------------
This inconsistency lies in fact that `LogEntry` model allows for
`content_type` (and `object_id`) to be `None` (both attributes are defined
as `blank=True, null=True`). This causes admin index page failing to
render in line 62 of index.html template, which implicitly requires
content type to be set: `{% filter capfirst %}{% trans
entry.content_type.name %}{% endfilter %}`.
{{{
Caught an exception while rendering: Failed lookup for key [name] in
u'None'
Original Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/django/template/debug.py", line 71,
in render_node
result = node.render(context)
File "/usr/lib/python2.5/site-packages/django/templatetags/i18n.py", line
42, in render
value = self.value.resolve(context)
File "/usr/lib/python2.5/site-packages/django/template/__init__.py", line
676, in resolve
value = self._resolve_lookup(context)
File "/usr/lib/python2.5/site-packages/django/template/__init__.py", line
729, in _resolve_lookup
raise VariableDoesNotExist("Failed lookup for key [%s] in %r", (bit,
current)) # missing attribute
VariableDoesNotExist: Failed lookup for key [name] in u'None'
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/10275>
Django <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---