initial commit

This commit is contained in:
2026-08-11 17:39:34 -05:00
commit 9b44006c18
22 changed files with 24580 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
==================
Autoescape
==================
<div>
<ul>
<li>one</li>
{% autoescape off %}
<li>two</li>
{% endautoescape %}
<li>tree</li>
</ul>
</div>
---
(template
(content)
(autoescape_group
(template
(content)))
(content))
+165
View File
@@ -0,0 +1,165 @@
==================
Block
==================
<section>
<h1>This is a block</h1>
{% block test %}
<main>
<h2>Hello World</h2>
</main>
{% endblock %}
<footer>Goodbye</footer>
</section>
---
(template
(content)
(block_group
(push_block)
(template
(content))
(pop_block))
(content))
==================
Block Matching End Tag
==================
<section>
<h1>This is a block</h1>
{% block test %}
<main>
<h2>Hello World</h2>
</main>
{% endblock test %}
<footer>Goodbye</footer>
</section>
---
(template
(content)
(block_group
(push_block)
(template
(content))
(pop_block))
(content))
==================
Nested Blocks
==================
<section>
<h1>This is a block</h1>
{% block test %}
<main>
{% block hello %}
<h2>Hello World</h2>
{% endblock %}
</main>
{% endblock %}
<footer>Goodbye</footer>
</section>
---
(template
(content)
(block_group
(push_block)
(template
(content)
(block_group
(push_block)
(template
(content))
(pop_block))
(content))
(pop_block))
(content))
---
(template
(content)
(block_group
(push_block)
(template
(content)
(block_group
(push_block)
(template
(content))
(pop_block))
(content))
(pop_block))
(content))
==================
Nested Blocks End Tag
==================
<section>
<h1>This is a block</h1>
{% block test %}
<main>
{% block hello %}
<h2>Hello World</h2>
{% endblock hello %}
</main>
{% endblock test %}
<footer>Goodbye</footer>
</section>
---
(template
(content)
(block_group
(push_block)
(template
(content)
(block_group
(push_block)
(template
(content))
(pop_block))
(content))
(pop_block))
(content))
==================
Nested Blocks Mixed Tags
==================
<section>
<h1>This is a block</h1>
{% block test %}
<main>
{% block hello %}
<h2>Hello World</h2>
{% endblock %}
</main>
{% endblock test %}
<footer>Goodbye</footer>
</section>
---
(template
(content)
(block_group
(push_block)
(template
(content)
(block_group
(push_block)
(template
(content))
(pop_block))
(content))
(pop_block))
(content))
+14
View File
@@ -0,0 +1,14 @@
==================
Csrf Token
==================
<form method="post">
{% csrf_token %}
</form>
---
(template
(content)
(csrf_token)
(content))
+93
View File
@@ -0,0 +1,93 @@
==================
Cycle Basic
==================
<table>
<tr class="{% cycle 'row1' 'row2' %}">
</tr>
</table>
---
(template
(content)
(cycle
(filtered_value
(value
(literal
(string))))
(filtered_value
(value
(literal
(string)))))
(content))
==================
Cycle With As
==================
<table>
<tr class="{% cycle 'row1' 'row2' as rowcolors %}">
</tr>
</table>
---
(template
(content)
(cycle
(filtered_value
(value
(literal
(string))))
(filtered_value
(value
(literal
(string))))
name: (identifier))
(content))
==================
Cycle With As And Silent
==================
<table>
<tr class="{% cycle 'row1' 'row2' as rowcolors silent %}">
</tr>
</table>
---
(template
(content)
(cycle
(filtered_value
(value
(literal
(string))))
(filtered_value
(value
(literal
(string))))
name: (identifier))
(content))
==================
Cycle Referencing Existing Variable
==================
<table>
<tr class="{% cycle rowcolors %}">
</tr>
</table>
---
(template
(content)
(cycle
(filtered_value
(value
(variable_attribute
(identifier)))))
(content))
+14
View File
@@ -0,0 +1,14 @@
==================
Debug
==================
<p>
{% debug %}
</p>
---
(template
(content)
(debug)
(content))
+35
View File
@@ -0,0 +1,35 @@
==================
Extends With String
==================
{% extends "base.html" %}
<h1>Hello</h1>
---
(template
(content)
(extends
(filtered_value
(value
(literal
(string)))))
(content))
==================
Extends With Variable
==================
{% extends base_template %}
<h1>Hello</h1>
---
(template
(content)
(extends
(filtered_value
(value
(variable_attribute
(identifier)))))
(content))
+27
View File
@@ -0,0 +1,27 @@
<body>
{# hello this is an example file #}
<header>
<h1>{{ page.title|title }}</h1>
<nav>
{% if page.links|length > 0 %}
<ul>
{% for label, link in page.links %}
<li>
{% url 'nav-pages' link as href %}
<a href="{{href}}">{{label}}</a>
</li>
{% endfor %}
</ul>
{% endif %}
</nav>
</header>
{% block content %}
{% endblock %}
<footer>
{% for foot in page.footer %}
{% endfor %}
</footer>
</body>