Ticket #8554: cast_to_unicode.diff

File cast_to_unicode.diff, 780 bytes (added by cmutel@…, 16 years ago)

Uses smart_unicode() instead of str()

  • django/contrib/comments/templatetags/comments.py

     
    33from django.conf import settings
    44from django.contrib.contenttypes.models import ContentType
    55from django.contrib import comments
     6from django.utils.encoding import smart_unicode
    67
    78register = template.Library()
    89
     
    7778
    7879        qs = self.comment_model.objects.filter(
    7980            content_type = ctype,
    80             object_pk    = object_pk,
     81            object_pk    = smart_unicode(object_pk),
    8182            site__pk     = settings.SITE_ID,
    8283            is_public    = True,
    8384        )
Back to Top