title: Python Flask : Variable inside {% %}
body: <p>i made a route which is basically like this : </p>
  
  <pre><code>@app.route("/articles/&lt;string:id&gt;")
  def articleByid (id):
  return render_template('subject.html', id=id, articles=Articles)
  </code></pre>
  
  <p><strong>subject.html :</strong> </p>
  
  <pre><code>{% for article in articles %}
      {% if article.id == {{ id }} %}
          &lt;h2&gt;[ {{ article['id'] }} ] - {{ article['title'] }}&lt;/h2&gt;&lt;br&gt;
          &lt;p&gt;Written by : {{ article['author'] }}&lt;/p&gt;&lt;br&gt;
          &lt;h4&gt;{{ article['body'] }}&lt;/h4&gt;&lt;br&gt;
          &lt;p&gt; -| {{ article['create_date'] }} |-&lt;/p&gt;&lt;br&gt;
      {% endif %}
  {% endfor %}
  </code></pre>
  
  <p><strong>the problem is that it yells at me because it is expecting something in :</strong></p>
  
  <blockquote>
    <p>{% if article.id == {{ id }} %}</p>
  </blockquote>
  
  <p>I passed my my dictionary correctly it works fine .. and i also passed id as string .. and basically i want to  get the content of the subject called by id in from url , I have no idea why it does not work !</p>