Ticket #14417: log.patch
File log.patch, 753 bytes (added by , 14 years ago) |
---|
-
django/contrib/admin/templatetags/log.py
old new 1 1 from django import template 2 from django.utils.encoding import force_unicode 2 3 from django.contrib.admin.models import LogEntry 3 4 4 5 register = template.Library() … … 18 19 if not user_id.isdigit(): 19 20 user_id = context[self.user].id 20 21 context[self.varname] = LogEntry.objects.filter(user__id__exact=user_id).select_related('content_type', 'user')[:self.limit] 22 for entry in context[self.varname]: 23 entry.content_type.name = force_unicode(entry.content_type.name) 21 24 return '' 22 25 23 26 class DoGetAdminLog: