Below you will find pages that utilize the taxonomy term “template”
January 31, 2016
Django: How to pass an url as parameter of include
In Django web applications I usually have a single template file for navigation or bread crumb that I include from other template files, it is easy and straight forward to pass parameter to the included template file, some thing like:
{% include "nav.html" with title="title" object=my_object %} But it would be a little tricker to send a URL as a parameter, i.e. you can’t write it:
{# WRONG DOESN'T WORK #} {% include "nav.