diff options
| author | Berker Peksag <berker.peksag@gmail.com> | 2014-11-27 02:41:27 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-12-03 14:27:38 -0500 |
| commit | 560b4207b1490a7d0cbf70cfbeba7daf2082e5be (patch) | |
| tree | 9656c5e6a5d0de63024bb5ff2291963f4f236100 /django/template | |
| parent | 50c1d8f24b0d04c813b3dd34720df86446091afa (diff) | |
Removed redundant numbered parameters from str.format().
Since Python 2.7 and 3.1, "{0} {1}" is equivalent to "{} {}".
Diffstat (limited to 'django/template')
| -rw-r--r-- | django/template/defaulttags.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/template/defaulttags.py b/django/template/defaulttags.py index 51ddfc9819..c6814983e7 100644 --- a/django/template/defaulttags.py +++ b/django/template/defaulttags.py @@ -56,7 +56,7 @@ class CsrfTokenNode(Node): if csrf_token == 'NOTPROVIDED': return format_html("") else: - return format_html("<input type='hidden' name='csrfmiddlewaretoken' value='{0}' />", csrf_token) + return format_html("<input type='hidden' name='csrfmiddlewaretoken' value='{}' />", csrf_token) else: # It's very probable that the token is missing because of # misconfiguration, so we raise a warning @@ -195,7 +195,7 @@ class ForNode(Node): # Check loop variable count before unpacking if num_loopvars != len_item: warnings.warn( - "Need {0} values to unpack in for loop; got {1}. " + "Need {} values to unpack in for loop; got {}. " "This will raise an exception in Django 2.0." .format(num_loopvars, len_item), RemovedInDjango20Warning) |
