Ticket #4887: 4887_smart_str_comments.diff
File 4887_smart_str_comments.diff, 1012 bytes (added by , 17 years ago) |
---|
-
django/contrib/comments/templatetags/comments.py
5 5 from django.template import loader 6 6 from django.core.exceptions import ObjectDoesNotExist 7 7 from django.contrib.contenttypes.models import ContentType 8 from django.utils.encoding import smart_str 8 9 import re 9 10 10 11 register = template.Library() … … 174 175 if tokens[4] != 'with': 175 176 raise template.TemplateSyntaxError, "Fourth argument in %r tag must be 'with'" % tokens[0] 176 177 for option, args in zip(tokens[5::2], tokens[6::2]): 178 option = smart_str(option) 177 179 if option in ('photos_optional', 'photos_required') and not self.free: 178 180 # VALIDATION ############################################## 179 181 option_list = args.split(',')