Ticket #9083: getAdminLogRelated.patch

File getAdminLogRelated.patch, 932 bytes (added by santip, 16 years ago)

patch file

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

     
    1212
    1313    def render(self, context):
    1414        if self.user is None:
    15             context[self.varname] = LogEntry.objects.all().select_related()[:self.limit]
     15            context[self.varname] = LogEntry.objects.all().select_related('content_type', 'user')[:self.limit]
    1616        else:
    1717            if not self.user.isdigit():
    1818                self.user = context[self.user].id
    19             context[self.varname] = LogEntry.objects.filter(user__id__exact=self.user).select_related()[:self.limit]
     19            context[self.varname] = LogEntry.objects.filter(user__id__exact=self.user).select_related('content_type', 'user')[:self.limit]
    2020        return ''
    2121
    2222class DoGetAdminLog:
Back to Top