if block_name == 'from':\r
return parse_block_from(ast)\r
\r
+ if block_name == 'include':\r
+ return parse_block_include(ast)\r
+\r
if block_name == 'set':\r
return parse_block_set(ast)\r
\r
lineno=lineno_from_parseinfo(ast['parseinfo'])\r
)\r
\r
+def parse_block_include(ast):\r
+ block_parameters = ast['block']['parameters']\r
+\r
+ template = parse_conditional_expression(block_parameters[0]['value'])\r
+ with_context = _parse_import_context(block_parameters)\r
+ ignore_missing = False\r
+\r
+ if with_context is None:\r
+ with_context = False\r
+ else:\r
+ del block_parameters[-2:]\r
+\r
+ return nodes.Include(\r
+ template,\r
+ with_context,\r
+ ignore_missing,\r
+ lineno=lineno_from_parseinfo(ast['parseinfo'])\r
+ )\r
+\r
def parse_block_macro(ast):\r
definition = parse_variable(ast['start']['parameters'][0]['value'])\r
name = definition.node.name\r
{{ foo is not bar }}\r
{{ not (foo and bar) }}\r
{{ foo not in bar }}\r
-{% from 'forms.html' import input with context %}
\ No newline at end of file
+{% from 'forms.html' import input with context %}\r
+{% include 'header.html' without context %}
\ No newline at end of file