django template link to dynamic url -
I try to create a list from a dictionary, where I have the name of the stored footage ( My Template: How can I change the URL, from which it appears on : (Meditation Keep that idea name (now ',' small job ', [' now ',' short-job ']), (' middle job ') is still very much, but they are used on other occasions) < div class = "post-text" itemprop = "text"> Should do the trick. value1 ). So with every hit of the loop I can link to the right page. The problem is, I can not understand how I should fix
{{url "view_name"}} .
& lt; Table & gt; & Lt; TR & gt; & Lt; th colspan = "2" & gt; Timer & lt; / Th & gt; & Lt; / TR & gt; {% For key, value in timer. Idems}} & lt; Tr & gt; & Lt; Td> {{Key}} & lt; / Td> & Lt; Td> & Lt; a href = "{{url values.1}}" & gt; {{Values.0}} & lt; / A & gt; & Lt; / Td> & Lt; / TR & gt; {% Endfor%} & lt; / Table & gt;
value.1
, ('now', 'moderate_job')), ('long work', ['now', 'long_job']), ('alcohol', ['now', 'alcohol'] ), ('Drugs' [' now ',' drugs']), ('successor', ['now', 'successor]]), (' bullet deal ', [' now ',' bullet_del ']]] )
url is a template tag and is not a variable, therefore changing:
{{Url values.1}} In:
{% url values.1%}
Comments
Post a Comment