D
D
Denis2019-06-11 20:02:23
Django
Denis, 2019-06-11 20:02:23

How to disable authorization in django admin?

Authorization is on the site, it is more or less protected. Therefore, it will be easiest to protect the admin panel simply by removing the possibility of authorization from there. How can I do that?
There is an idea to take the admin authorization template and remove the form from there (but I didn’t find this template), or do something complicated, what would you advise?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Tikhonov, 2019-06-11
@igudo

Transfer from login to site authorization. You need to override the admin login view, in the Django sources you can see which url name corresponds to this page. And just put a redirect there on the login form to the site. When an authorized user enters the admin panel, his rights (is_superuser/is_staff) will be checked and a redirect to the login will be performed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question