summaryrefslogtreecommitdiff
path: root/django/forms/forms.py
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2014-11-27 02:41:27 +0200
committerTim Graham <timograham@gmail.com>2014-12-03 14:27:38 -0500
commit560b4207b1490a7d0cbf70cfbeba7daf2082e5be (patch)
tree9656c5e6a5d0de63024bb5ff2291963f4f236100 /django/forms/forms.py
parent50c1d8f24b0d04c813b3dd34720df86446091afa (diff)
Removed redundant numbered parameters from str.format().
Since Python 2.7 and 3.1, "{0} {1}" is equivalent to "{} {}".
Diffstat (limited to 'django/forms/forms.py')
-rw-r--r--django/forms/forms.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/forms/forms.py b/django/forms/forms.py
index 3f6a876832..e68542e12a 100644
--- a/django/forms/forms.py
+++ b/django/forms/forms.py
@@ -645,7 +645,7 @@ class BoundField(object):
# Translators: If found as last label character, these punctuation
# characters will prevent the default label_suffix to be appended to the label
if label_suffix and contents and contents[-1] not in _(':?.!'):
- contents = format_html('{0}{1}', contents, label_suffix)
+ contents = format_html('{}{}', contents, label_suffix)
widget = self.field.widget
id_ = widget.attrs.get('id') or self.auto_id
if id_:
@@ -659,7 +659,7 @@ class BoundField(object):
else:
attrs['class'] = self.form.required_css_class
attrs = flatatt(attrs) if attrs else ''
- contents = format_html('<label{0}>{1}</label>', attrs, contents)
+ contents = format_html('<label{}>{}</label>', attrs, contents)
else:
contents = conditional_escape(contents)
return mark_safe(contents)