Refs #23919 -- Removed obsolete comments about u'' prefixes.
This commit is contained in:
parent
ba76c3c45b
commit
c76d87427d
|
@ -273,10 +273,7 @@ class Command(BaseCommand):
|
||||||
if params['unique']:
|
if params['unique']:
|
||||||
columns = params['columns']
|
columns = params['columns']
|
||||||
if len(columns) > 1:
|
if len(columns) > 1:
|
||||||
# we do not want to include the u"" or u'' prefix
|
unique_together.append('(' + str(tuple(column_to_field_name[c] for c in columns)) + ')')
|
||||||
# so we build the string rather than interpolate the tuple
|
|
||||||
tup = '(' + ', '.join("'%s'" % column_to_field_name[c] for c in columns) + ')'
|
|
||||||
unique_together.append(tup)
|
|
||||||
managed_comment = " # Created from a view. Don't remove." if is_view else ""
|
managed_comment = " # Created from a view. Don't remove." if is_view else ""
|
||||||
meta = ["",
|
meta = ["",
|
||||||
" class Meta:",
|
" class Meta:",
|
||||||
|
|
|
@ -905,11 +905,8 @@ class AdminLogNodeTestCase(TestCase):
|
||||||
"""
|
"""
|
||||||
context = Context({'user': CustomIdUser()})
|
context = Context({'user': CustomIdUser()})
|
||||||
template_string = '{% load log %}{% get_admin_log 10 as admin_log for_user user %}'
|
template_string = '{% load log %}{% get_admin_log 10 as admin_log for_user user %}'
|
||||||
|
|
||||||
template = Template(template_string)
|
template = Template(template_string)
|
||||||
|
# This template tag just logs.
|
||||||
# Rendering should be u'' since this templatetag just logs,
|
|
||||||
# it doesn't render any string.
|
|
||||||
self.assertEqual(template.render(context), '')
|
self.assertEqual(template.render(context), '')
|
||||||
|
|
||||||
def test_get_admin_log_templatetag_no_user(self):
|
def test_get_admin_log_templatetag_no_user(self):
|
||||||
|
|
Loading…
Reference in New Issue