Django , Interpolate two strings in a template
While i was working on my weekend project http://downloader.zer0c00l.in/, I had to concat interpolate two strings inside a template, first string was hard coded in the template and another one had to be passed from the view. Initially i tried something like
<a href="/view/logs/?page="{{ page }}> next </a>
That resulted in <a href=”/view/logs/?page=”>next</a> . Django completely ignored the {{ page }}. After scratching my head for a long time i removed the quotes and rewrote the code into
<a href=/view/logs/?page={{ page }}> next </a>
That worked as expected.
Comments (0)
Trackbacks (0)
Leave a comment
Trackback