title: How can I delete a request.session variable inside the Django HTML template?
body: <p>Code:</p>
  <pre><code>{% if request.session.message %}
  &lt;div class=&quot;alert alert-warning alert-dismissible fade show&quot; role=&quot;alert&quot;&gt;
      &lt;i class=&quot;bi bi-check2-circle&quot;&gt;&lt;/i&gt; {{request.session.message}}
      &lt;button type=&quot;button&quot; class=&quot;btn-close&quot; data-bs-dismiss=&quot;alert&quot; aria-label=&quot;Close&quot;&gt;&lt;/button&gt;
  &lt;/div&gt;
  {% endif %}
  {% request.session.remove('message') %}
  </code></pre>
  <p>Error:</p>
  <p>TemplateSyntaxError at /
  Could not parse the remainder: '('message')' from 'request.session.remove('message')</p>