summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2018-03-21 08:15:07 -0400
committerGitHub <noreply@github.com>2018-03-21 08:15:07 -0400
commitc76d87427d70f6c91ab855ed688828aa982720d2 (patch)
tree6610cc91f69f8f0ce8b50d1dd9390e50a5d43f33
parentba76c3c45b9fee43c2791247e752959781368773 (diff)
Refs #23919 -- Removed obsolete comments about u'' prefixes.
-rw-r--r--django/core/management/commands/inspectdb.py5
-rw-r--r--tests/admin_changelist/tests.py5
2 files changed, 2 insertions, 8 deletions
diff --git a/django/core/management/commands/inspectdb.py b/django/core/management/commands/inspectdb.py
index 03c8749b90..f093e35be9 100644
--- a/django/core/management/commands/inspectdb.py
+++ b/django/core/management/commands/inspectdb.py
@@ -273,10 +273,7 @@ class Command(BaseCommand):
if params['unique']:
columns = params['columns']
if len(columns) > 1:
- # we do not want to include the u"" or u'' prefix
- # 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)
+ unique_together.append('(' + str(tuple(column_to_field_name[c] for c in columns)) + ')')
managed_comment = " # Created from a view. Don't remove." if is_view else ""
meta = ["",
" class Meta:",
diff --git a/tests/admin_changelist/tests.py b/tests/admin_changelist/tests.py
index f37e3fa039..1d9dc61682 100644
--- a/tests/admin_changelist/tests.py
+++ b/tests/admin_changelist/tests.py
@@ -905,11 +905,8 @@ class AdminLogNodeTestCase(TestCase):
"""
context = Context({'user': CustomIdUser()})
template_string = '{% load log %}{% get_admin_log 10 as admin_log for_user user %}'
-
template = Template(template_string)
-
- # Rendering should be u'' since this templatetag just logs,
- # it doesn't render any string.
+ # This template tag just logs.
self.assertEqual(template.render(context), '')
def test_get_admin_log_templatetag_no_user(self):