bundled/jinja2/ext/django2jinja/templates/index.html @ 16e0bcd4f854

Switch to the new hg spanset API

This api was introduced in 3.2, and the indexation is not supported anymore (probably since
3.4)

Patch provided by David Douard
(see https://bitbucket.org/sjl/hg-review/pull-requests/8/better-handling-of-obsolescence-markers/diff#comment-8174971)
author Christophe de Vienne <christophe@cdevienne.info>
date Fri, 19 Aug 2016 18:21:28 +0200
parents 256716e3a3d7
children (none)
{% extends "layout.html" %}
{% load i18n %}
{% block title %}Foo{% endblock %}
{% block page-body %}
  {{ block.super }}
  Hello {{ name|cut:"d" }}!

  {% for item in seq reversed %}
    {% if forloop.index|divisibleby:2 %}
      <li class="{% cycle 'a' 'b' %}">{{ item }}</li>
    {% endif %}
  {% endfor %}
  {% ifequal foo bar %}
    haha
  {% else %}
    hmm
  {% endifequal %}
  {% filter upper %}
    {% include "subtemplate.html" %}
    {% include foo %}
  {% endfilter %}
  {% spaceless %}
    Hello World
      {{ foo }}
    Hmm
  {% endspaceless %}
  {% templatetag opencomment %}...{% templatetag closecomment %}
  {% url foo a, b, c=d %}
  {% url foo a, b, c=d as hmm %}

  {% with object.value as value %}
    <img src='bar.gif' height='10' width='{% widthratio value 200 100 %}'>
  {% endwith %}

  <pre>{% debug %}</pre>

  {% blocktrans with book|title as book_t and author|title as author_t %}
  This is {{ book_t }} by {{ author_t }}
  {% endblocktrans %}

  {% blocktrans count list|length as counter %}
  There is only one {{ name }} object.
  {% plural %}
  There are {{ counter }} {{ name }} objects.
  {% endblocktrans %}

  {% blocktrans with name|escape as name count list|length as counter %}
  There is only one {{ name }} object.
  {% plural %}
  There are {{ counter }} {{ name }} objects.
  {% endblocktrans %}

  {% blocktrans %}This string will have {{ value }} inside.{% endblocktrans %}

  <p>{% trans "This is the title." %}</p>

  {% regroup people by gender as grouped %}
{% endblock %}