{% load url from future %} <{{ tag }} class="{% if user.is_authenticated %}edit_chunk{% endif %}" data-key="{{ chunk_key }}"> {{ obj.content|safe }} {% if request.user.is_authenticated %} редактировать {% endif %}