summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--django/template/__init__.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/django/template/__init__.py b/django/template/__init__.py
index 993de7304e..e8a4cfc744 100644
--- a/django/template/__init__.py
+++ b/django/template/__init__.py
@@ -614,7 +614,11 @@ def resolve_variable(path, context):
(The example assumes VARIABLE_ATTRIBUTE_SEPARATOR is '.')
"""
- if path[0].isdigit():
+ if path == 'False':
+ path = False
+ elif path == 'True':
+ path = True
+ elif path[0].isdigit():
number_type = '.' in path and float or int
try:
current = number_type(path)