summaryrefslogtreecommitdiff
path: root/django/utils
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/utils
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/utils')
-rw-r--r--django/utils/html.py2
-rw-r--r--django/utils/log.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/django/utils/html.py b/django/utils/html.py
index 2dc16d5d71..1247849f31 100644
--- a/django/utils/html.py
+++ b/django/utils/html.py
@@ -105,7 +105,7 @@ def format_html_join(sep, format_string, args_generator):
Example:
- format_html_join('\n', "<li>{0} {1}</li>", ((u.first_name, u.last_name)
+ format_html_join('\n', "<li>{} {}</li>", ((u.first_name, u.last_name)
for u in users))
"""
diff --git a/django/utils/log.py b/django/utils/log.py
index 6ced3a4a63..fc350e0b5e 100644
--- a/django/utils/log.py
+++ b/django/utils/log.py
@@ -109,7 +109,7 @@ class AdminEmailHandler(logging.Handler):
record.getMessage()
)
filter = get_exception_reporter_filter(request)
- request_repr = '\n{0}'.format(force_text(filter.get_request_repr(request)))
+ request_repr = '\n{}'.format(force_text(filter.get_request_repr(request)))
except Exception:
subject = '%s: %s' % (
record.levelname,