[英]Simple way to delete users account?
Is there a simple way or code to delete the account from a user? 有没有简单的方法或代码可以从用户中删除帐户? I want to delete the username, email address, first_name, last_name and the profile-data.
我要删除用户名,电子邮件地址,名字,姓氏和个人资料数据。
I do have two apps 我有两个应用
Thanks! 谢谢!
Are you looking to delete the user database record? 您是否要删除用户数据库记录? If so, search for it then call delete:
如果是这样,搜索它,然后调用delete:
user = User.objects.get(username='their_username')
user.delete()
Can You Explain What kind of application you Use? 您能解释一下您使用哪种应用程序吗? If you use some kind of database with your application then simply run delete query with some specific condition
如果您在应用程序中使用某种数据库,则只需运行具有特定条件的删除查询
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.