title: Jinja: overwrite html tag
body: <p>I have two jinja2 templates: <code>base.tmpl</code> and <code>child.tmpl</code></p>
  <p><em>base.tmpl</em></p>
  <pre><code>{% block head %}
      &lt;meta property=&quot;og:image&quot; content=&quot;url_for_DEFAULT_IMAGE.png&quot;/&gt;
      &lt;meta property=&quot;og:title&quot; content=&quot;Title&quot;/&gt;
  {% endblock %}
  {% block app_content %}
  {% endblock %}
  </code></pre>
  <p><em>child.tmpl</em></p>
  <pre><code>{% extends &quot;base.tmpl&quot; %}
  {% block head %}
      {% super() %}
      &lt;meta property=&quot;og:image&quot; content=&quot;url_for_CUSTOM_IMAGE.png&quot;/&gt;
  {% endblock %}
  {% block app_content %}
      &lt;body&gt;
          ...
          some_html_content
          ...
      &lt;/body&gt;
  {% endblock %}
  </code></pre>
  <p><strong>If run this as is I have following result:</strong></p>
  <pre><code>&lt;head&gt;
      &lt;meta property=&quot;og:image&quot; content=&quot;url_for_DEFAULT_IMAGE.png&quot;/&gt;
      &lt;meta property=&quot;og:title&quot; content=&quot;Title&quot;/&gt;
      &lt;meta property=&quot;og:image&quot; content=&quot;url_for_CUSTOM_IMAGE.png&quot;/&gt;
  &lt;/head&gt;
  &lt;body&gt;
      ...
      some_html_content
      ...
  &lt;/body&gt;
  </code></pre>
  <p><strong>My goal is to overwrite <code>&lt;meta property=&quot;og:image&quot;&gt;</code></strong> so that I end up with the only one <code>&lt;meta property=&quot;og:image&quot;&gt;</code> tag as following:</p>
  <pre><code>&lt;head&gt;
      &lt;meta property=&quot;og:title&quot; content=&quot;Title&quot;/&gt;
      &lt;meta property=&quot;og:image&quot; content=&quot;url_for_CUSTOM_IMAGE.png&quot;/&gt;
  &lt;/head&gt;
  &lt;body&gt;
      ...
      some_html_content
      ...
  &lt;/body&gt;
  </code></pre>