G
G
GrayDead2021-09-01 16:54:24
Django
GrayDead, 2021-09-01 16:54:24

How to implement registration and authorization on all pages of the site?

How to implement registration and authorization in Django on all pages of the site in modal windows ???
I tried to implement this via context_processors.py but ran into problems:
1. I can't differentiate between the POST request calls for the login form and the login form.
2. Since context_processors.py returns a dict, I can't validate the user and return a JsonResponse

So what Django tools should I use to implement my plan???

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question