diff --git a/AUTHORS b/AUTHORS index 841f046982..fb2d5f7112 100644 --- a/AUTHORS +++ b/AUTHORS @@ -70,6 +70,7 @@ answer newbie questions, and generally made Django that much better: Amit Chakradeo ChaosKCW ivan.chelubeev@gmail.com + Bryan Chow Ian Clelland crankycoder@gmail.com Matt Croydon diff --git a/django/contrib/admin/templatetags/log.py b/django/contrib/admin/templatetags/log.py index 5caba2b795..8d52d2e944 100644 --- a/django/contrib/admin/templatetags/log.py +++ b/django/contrib/admin/templatetags/log.py @@ -11,9 +11,12 @@ class AdminLogNode(template.Node): return "" 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: