Skip to content

Commit 29891ad

Browse files
committed
Fixed #4887 -- Fixed another place where template tag arguments are used
directly as function keyword args. Thanks, Brian Rosner. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5715 bcc190cf-cafb-0310-a4f2-bffc1f526a37
1 parent 58096c4 commit 29891ad

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ answer newbie questions, and generally made Django that much better:
222222
rhettg@gmail.com
223223
Henrique Romano <onaiort@gmail.com>
224224
Armin Ronacher
225+
Brian Rosner <brosner@gmail.com>
225226
Oliver Rutherfurd <http://rutherfurd.net/>
226227
Ivan Sagalaev (Maniac) <http://www.softwaremaniacs.org/>
227228
Vinay Sajip <vinay_sajip@yahoo.co.uk>

django/contrib/comments/templatetags/comments.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from django.template import loader
66
from django.core.exceptions import ObjectDoesNotExist
77
from django.contrib.contenttypes.models import ContentType
8+
from django.utils.encoding import smart_str
89
import re
910

1011
register = template.Library()
@@ -174,6 +175,7 @@ def __call__(self, parser, token):
174175
if tokens[4] != 'with':
175176
raise template.TemplateSyntaxError, "Fourth argument in %r tag must be 'with'" % tokens[0]
176177
for option, args in zip(tokens[5::2], tokens[6::2]):
178+
option = smart_str(option)
177179
if option in ('photos_optional', 'photos_required') and not self.free:
178180
# VALIDATION ##############################################
179181
option_list = args.split(',')

0 commit comments

Comments
 (0)