djangosnippets.org: Latest snippets tagged with 'extends'https://djangosnippets.org/tags/extends/2016-03-17T07:00:40.022829-05:00Relative paths for Django template tags 'extends' and 'include'.
2016-03-17T07:00:40.022829-05:00vb64https://djangosnippets.org/snippets/10558/<p><a href="http://stackoverflow.com/questions/671369/django-specifying-a-base-template-by-directory">The problem</a>: {% extends "./../base.html" %} won't work with extends.</p>
<p>It causes a lot of inconvenience, if you have an extensive hierarchy of django templates.
This library allows relative paths in argument of 'extends' and 'include' template tags. Relative path must start from "./"</p>
<p>Just write in your templates …</p>
Freely redistributableTemplate tag: Extend with parameters
2007-10-17T08:08:36.388418-05:00miracle2khttps://djangosnippets.org/snippets/447/<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 …</p>
Freely redistributable