Задать вопрос

Тел: +7 965 3737 888

420

Просмотров

0

Ответов

Template tag: Extend with parameters

<p>Extended extends tag that supports passing parameters, which will be made
   available in the context of the extended template (and all the way up the
   hierarchy).
</p>
<p>It wraps around the orginal extends tag, to avoid code duplication, and to
   not miss out on possible future django enhancements.
   Note: The current implementation will override variables passed from your
   view, too, so be careful.
</p>
<p>Some of the argument parsing code is based on:
       http://www.djangosnippets.org/snippets/11/
</p>
<p>Examples:
</p>
{% xextends "some.html" %}
{% xextends "some.html" with title="title1" %}
{% xextends "some.html" with title="title2"|capfirst %}

Вопрос полезен? Да0/Нет0
file_4060.py(1.6Кб)
None