Answer the question
In order to leave comments, you need to log in
Cookies. How to remember the performed action?
Hello. There is a voting form
<form action="{% url 'posts:votes' post.chpu %}" method="post">
{% csrf_token %}
<button name="butt" id="plus-rat type="submit">Да</button>
<button>Нет</button>
</form>
Answer the question
In order to leave comments, you need to log in
It is worth writing in cookies only those values that are needed for data exchange with the server, because cookie is sent with each request (unless specifically disabled), it's better to use localStorage.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question