summaryrefslogtreecommitdiff
path: root/django/template
diff options
context:
space:
mode:
authorPiotr Jakimiak <pj306228@students.mimuw.edu.pl>2015-05-13 20:51:18 +0200
committerPiotr Jakimiak <pj306228@students.mimuw.edu.pl>2015-05-13 20:51:18 +0200
commit4157c502a5202798d0f73645181cb82aa71d34d9 (patch)
tree78c99c7fd271f6c25a71b2ccf781ab7928396677 /django/template
parentf61c4f490dc4c8ec6ba94ad4f40247db2425fc3e (diff)
Removed unnecessary arguments in .get method calls
Diffstat (limited to 'django/template')
-rw-r--r--django/template/base.py4
-rw-r--r--django/template/defaulttags.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/django/template/base.py b/django/template/base.py
index 3fd02570c2..1b05fe57b8 100644
--- a/django/template/base.py
+++ b/django/template/base.py
@@ -1325,7 +1325,7 @@ class Library(object):
# inclusion tags are often used for forms, and we need
# instructions for using CSRF protection to be as simple
# as possible.
- csrf_token = context.get('csrf_token', None)
+ csrf_token = context.get('csrf_token')
if csrf_token is not None:
new_context['csrf_token'] = csrf_token
return t.render(new_context)
@@ -1421,7 +1421,7 @@ def get_library(library_name):
Subsequent loads eg. {% load somelib %} in the same process will grab
the cached module from libraries.
"""
- lib = libraries.get(library_name, None)
+ lib = libraries.get(library_name)
if not lib:
templatetags_modules = get_templatetags_modules()
tried_modules = []
diff --git a/django/template/defaulttags.py b/django/template/defaulttags.py
index df2de0f2ea..54d0d5d449 100644
--- a/django/template/defaulttags.py
+++ b/django/template/defaulttags.py
@@ -53,7 +53,7 @@ class CommentNode(Node):
class CsrfTokenNode(Node):
def render(self, context):
- csrf_token = context.get('csrf_token', None)
+ csrf_token = context.get('csrf_token')
if csrf_token:
if csrf_token == 'NOTPROVIDED':
return format_html("")