1
0
mirror of https://github.com/django/django.git synced 2025-01-23 08:39:17 +00:00

Fixed #8110 -- Allow for AdminLogNode's render to be called more than once.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9233 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Karen Tracey 2008-10-17 22:43:36 +00:00
parent 51d101b573
commit 9feebb10f9

View File

@ -14,9 +14,10 @@ class AdminLogNode(template.Node):
if self.user is None:
context[self.varname] = LogEntry.objects.all().select_related('content_type', 'user')[:self.limit]
else:
if not self.user.isdigit():
self.user = context[self.user].id
context[self.varname] = LogEntry.objects.filter(user__id__exact=self.user).select_related('content_type', 'user')[:self.limit]
user_id = self.user
if not user_id.isdigit():
user_id = context[self.user].id
context[self.varname] = LogEntry.objects.filter(user__id__exact=user_id).select_related('content_type', 'user')[:self.limit]
return ''
class DoGetAdminLog: