#20088: Django admin log depends on User model having a field named id
-------------------------------------+-------------------------------------
Reporter: Ryan Leckey | Owner: nobody
<leckey.ryan@…> | Status: new
Type: Bug | Version: master
Component: contrib.admin | Resolution:
Severity: Normal | Triage Stage:
Keywords: | Unreviewed
configurable,user,model | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 1
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by Ryan Leckey <leckey.ryan@…>):
* needs_better_patch: => 1
* needs_tests: => 0
* needs_docs: => 0
Comment:
Something like the following works in my application.
{{{
def render(self, context):
entries = LogEntry.objects.all()
if self.user is not None:
entries = LogEntry.objects.filter(user__exact=self.user)
context[self.varname] = entries.select_related('content_type',
'user')[:self.limit]
return ''
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/20088#comment:1>
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 post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.