Author: mtredinnick
Date: 2007-05-07 22:56:44 -0500 (Mon, 07 May 2007)
New Revision: 5170
Modified:
django/trunk/AUTHORS
django/trunk/django/contrib/admin/templatetags/log.py
Log:
Fixed #4200 -- Made get_admin_log template tag behave according to its
docstring (user specifier is optional). Thanks, Bryan Chow.
Modified: django/trunk/AUTHORS
===================================================================
--- django/trunk/AUTHORS 2007-05-08 03:45:33 UTC (rev 5169)
+++ django/trunk/AUTHORS 2007-05-08 03:56:44 UTC (rev 5170)
@@ -70,6 +70,7 @@
Amit Chakradeo <http://amit.chakradeo.net/>
ChaosKCW
[EMAIL PROTECTED]
+ Bryan Chow <bryan at verdjn dot com>
Ian Clelland <[EMAIL PROTECTED]>
[EMAIL PROTECTED]
Matt Croydon <http://www.postneo.com/>
Modified: django/trunk/django/contrib/admin/templatetags/log.py
===================================================================
--- django/trunk/django/contrib/admin/templatetags/log.py 2007-05-08
03:45:33 UTC (rev 5169)
+++ django/trunk/django/contrib/admin/templatetags/log.py 2007-05-08
03:56:44 UTC (rev 5170)
@@ -11,9 +11,12 @@
return "<GetAdminLog Node>"
def render(self, context):
- if self.user is not None and not self.user.isdigit():
- self.user = context[self.user].id
- context[self.varname] =
LogEntry.objects.filter(user__id__exact=self.user).select_related()[:self.limit]
+ if self.user is None:
+ context[self.varname] =
LogEntry.objects.all().select_related()[: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()[:self.limit]
return ''
class DoGetAdminLog:
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---