How to disable users from admin panel and django?

946 Views Asked by At

I know they provide add, update, delete and view. But I want the users' data to not get deleted and disable user so they cannot use website until enabled again.

2

There are 2 best solutions below

0
On

The django admin provides an is_active checkbox. enter image description here

0
On

Uncheck the is_active checkbox and save. Django does not log in users whose is_active value is False.