Ticket #14417: log.diff

File log.diff, 830 bytes (added by ctetruite, 14 years ago)
  • django/contrib/admin/templatetags/log.py

     
    11from django import template
     2from django.utils.encoding import force_unicode
    23from django.contrib.admin.models import LogEntry
    34
    45register = template.Library()
     
    1819            if not user_id.isdigit():
    1920                user_id = context[self.user].id
    2021            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)
    2124        return ''
    2225
    2326class DoGetAdminLog:
Back to Top