简体   繁体   English

如何从管理面板和 django 禁用用户?

[英]How to disable users from admin panel and django?

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.但我希望用户的数据不会被删除并禁用用户,这样他们才能使用网站,直到再次启用。

The django admin provides an is_active checkbox. django 管理员提供了一个is_active复选框。 在此处输入图像描述

Uncheck the is_active checkbox and save.取消选中 is_active 复选框并保存。 Django does not log in users whose is_active value is False. Django 不会登录 is_active 值为 False 的用户。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM