Answer the question
In order to leave comments, you need to log in
How to refresh blocks with permissions after Ajax authorization requests?
Hello everyone
On the page there are a number of elements that look like this:
{% if user.is_authenticated %}
<li><a href="{% url "profile" user.id %}">Профиль</a></li>
<li><a href="{% url "logout" %}">Выйти</a></li>
{% else %}
<li><a href="{% url "login" %}">Войти</a></li>
<li><a href="{% url "registration" %}">Регистрация</a></li>
{% endif %}
Answer the question
In order to leave comments, you need to log in
Kostylno:
Judging by the fact that you want to login without reloading the page, use some JS framework on the Front-End (Angular, React, Vue, Ember).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question