title: How to write python code in HTML in Django?
body: <p>I need to create a path in an HTML code that is used to generate a download link. </p>
  
  <pre><code>   {% for data in all_data %}
     {% path_zip = '/home/harish/Desktop/cvision/users_output_files/{0}.zip'.format(data.id) %}
        &lt;tr&gt;
            &lt;td&gt; {{data.id}} &lt;/td&gt;
            &lt;td&gt; {{data.childname}} &lt;/td&gt;
            &lt;td&gt; {{data.age}} &lt;/td&gt;
            &lt;td&gt; {{data.gender}} &lt;/td&gt;
            &lt;td&gt; &lt;a href={{path_zip}} download&gt;&lt;/a&gt; &lt;/td&gt;
        &lt;/tr&gt;
    {% endfor %}
  </code></pre>
  
  <p>But this code is not working. And the following is the error. </p>
  
  <pre><code>Invalid block tag on line 40: 'path_zip', expected 'empty' or 'endfor'. Did you forget to register or load this tag?
  </code></pre>
  
  <p>How do I solve it?</p>