{% if request.user.is_authenticated %}
{% csrf_token %} {% if tag %}{% else %}{% endif %}
{% endif %}