@register.tag('<STR_LIT>')<EOL>def include_(parser, token):
bits = token.split_contents()<EOL>dynamic = False<EOL>if len(bits) >= <NUM_LIT:2>:<EOL><INDENT>dynamic = '<STR_LIT>' in bits[<NUM_LIT:1>]<EOL>if dynamic:<EOL><INDENT>fallback = None<EOL>bits_new = []<EOL>for bit in bits:<EOL><INDENT>if fallback is True:<EOL><INDENT>fallback = bit<EOL>continue<EOL><DEDENT>if bit == '<STR_LIT>':<EOL><INDENT>fallback = True<EOL><DEDENT>else:<EOL><INDENT>bits_new.append(bit)<EOL><DEDENT><DEDENT>if fallback:<EOL><INDENT>fallback = parser.compile_filter(construct_relative_path_(parser, fallback))<EOL><DEDENT>token.contents = '<STR_LIT:U+0020>'.join(bits_new)<EOL><DEDENT><DEDENT>token.contents = token.contents.replace('<STR_LIT>', '<STR_LIT>')<EOL>include_node = do_include(parser, token)<EOL>if dynamic:<EOL><INDENT>include_node = DynamicIncludeNode(<EOL>include_node.template,<EOL>extra_context=include_node.extra_context,<EOL>isolated_context=include_node.isolated_context,<EOL>fallback=fallback or None,<EOL>)<EOL><DEDENT>return include_node<EOL>
Similar to built-in ``include`` template tag, but allowing
    template variables to be used in template name and a fallback template,
    thus making the tag more dynamic.

    .. warning:: Requires Django 1.8+

    Example:

        {% load etc_misc %}
        {% include_ "sub_{{ postfix_var }}.html" fallback "default.html" %}