Ticket #4200: get_admin_log.patch

File get_admin_log.patch, 809 bytes (added by anonymous, 18 years ago)

Fix for get_admin_log template tag

  • django/contrib/admin/templatetags/log.py

     
    1313    def render(self, context):
    1414        if self.user is not None and not self.user.isdigit():
    1515            self.user = context[self.user].id
    16         context[self.varname] = LogEntry.objects.filter(user__id__exact=self.user).select_related()[:self.limit]
     16        if self.user is None:
     17            context[self.varname] = LogEntry.objects.all().select_related()[:self.limit]
     18        else:
     19            context[self.varname] = LogEntry.objects.filter(user__id__exact=self.user).select_related()[:self.limit]
    1720        return ''
    1821
    1922class DoGetAdminLog:
Back to Top