# Django/Jinja2

To use this language, add the class "language-django" or "language-jinja2".

## Comment

    {# This is a comment #}

## Variable

    {{ some_variable }}

## Template Tag

    {% if some_condition %}
    Conditional block
    {% endif %}

## Full Example

    {# This a Django template example #}
    {% extends "base_generic.html" %}

    {% block title %}{{ section.title }}{% endblock %}

    {% block content %}
    <h1>{{ section.title }}</h1>

    {% for story in story_list %}
    <h2>
      <a href="{{ story.get_absolute_url }}">
        {{ story.headline|upper }}
      </a>
    </h2>
    <p>{{ story.tease|truncatewords:"100" }}</p>
    {% endfor %}
    {% endblock %}