{% if user.is_authenticated %} {# редирект после авторизации #} {% else %} {% endif %}