@@ -25,6 +25,7 @@ from django.utils import timezone
...
@@ -25,6 +25,7 @@ from django.utils import timezone
register=Library()
register=Library()
classAutoEscapeControlNode(Node):
classAutoEscapeControlNode(Node):
"""Implements the actions of the autoescape tag."""
"""Implements the actions of the autoescape tag."""
def__init__(self,setting,nodelist):
def__init__(self,setting,nodelist):
...
@@ -40,10 +41,12 @@ class AutoEscapeControlNode(Node):
...
@@ -40,10 +41,12 @@ class AutoEscapeControlNode(Node):
else:
else:
returnoutput
returnoutput
classCommentNode(Node):
classCommentNode(Node):
defrender(self,context):
defrender(self,context):
return''
return''
classCsrfTokenNode(Node):
classCsrfTokenNode(Node):
defrender(self,context):
defrender(self,context):
csrf_token=context.get('csrf_token',None)
csrf_token=context.get('csrf_token',None)
...
@@ -59,6 +62,7 @@ class CsrfTokenNode(Node):
...
@@ -59,6 +62,7 @@ class CsrfTokenNode(Node):
warnings.warn("A {% csrf_token %} was used in a template, but the context did not provide the value. This is usually caused by not using RequestContext.")
warnings.warn("A {% csrf_token %} was used in a template, but the context did not provide the value. This is usually caused by not using RequestContext.")