summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-11-17 15:38:29 -0500
committerTim Graham <timograham@gmail.com>2018-11-17 14:46:04 -0500
commit568c2f45ef531257a600c0e6ff8fe02525d7ab4e (patch)
treef53dd0532b05d29ed6a0063df245e900afca3f40
parent216398d1b12bc63a82580705ad9f9ed00b28ac4a (diff)
downloaddjango-568c2f45ef531257a600c0e6ff8fe02525d7ab4e.tar.gz
[1.11.x] Refs #28814 -- Fixed "SyntaxError: Generator expression must be parenthesized" on Python 3.7.
Due to https://bugs.python.org/issue32012. Backport of 931c60c5216bd71bc11f489e00e063331cf21f40 from master
-rw-r--r--django/contrib/admin/widgets.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/django/contrib/admin/widgets.py b/django/contrib/admin/widgets.py
index 89e8adde30..62da6265b6 100644
--- a/django/contrib/admin/widgets.py
+++ b/django/contrib/admin/widgets.py
@@ -148,9 +148,7 @@ class ForeignKeyRawIdWidget(forms.TextInput):
params = self.url_parameters()
if params:
- related_url += '?' + '&amp;'.join(
- '%s=%s' % (k, v) for k, v in params.items(),
- )
+ related_url += '?' + '&amp;'.join('%s=%s' % (k, v) for k, v in params.items())
context['related_url'] = mark_safe(related_url)
context['link_title'] = _('Lookup')
# The JavaScript code looks for this class.