Skip to content

Instantly share code, notes, and snippets.

@issackelly
Created April 19, 2011 16:48
Show Gist options
  • Save issackelly/928783 to your computer and use it in GitHub Desktop.
Save issackelly/928783 to your computer and use it in GitHub Desktop.

Revisions

  1. issackelly created this gist Apr 19, 2011.
    38 changes: 38 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,38 @@
    # Template: A.html
    <html>
    <head></head>
    <body>
    {% block hello %}
    HELLO
    {% endblock %}
    </body>
    </html>

    # Template B.html
    {% extends "A.html" %}
    {% block hello %}
    World
    {% endblock %}

    # Rendered Template B
    <html>
    <head></head>
    <body>
    World
    </body>
    </html>

    # Template C
    {% extends "A.html" %}
    {% block hello %}
    {{ block.super }} World
    {% endblock %}


    # Rendered Template C
    <html>
    <head></head>
    <body>
    Hello World
    </body>
    </html>