简体   繁体   English

删除用户帐户的简单方法?

[英]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.

相关问题 有没有办法在这个简单的 for 循环中解释标点符号 - Is there a way to account for punctuation in this simple for loop Django:如何使用户能够删除他们的帐户 - Django: How to enable users to delete their account 有没有一种简单的方法可以按值删除列表元素? - Is there a simple way to delete a list element by value? 从 Python 中删除现有 Pod 的简单方法 - Simple way to delete existing pods from Python 将现有用户数据库(非Django)添加到Django的简单方法 - simple way to add existing users database(non django) to django 从列表中删除嵌套(包含2个元素的列表)的简单方法? - Simple way to delete nested (list of 2 elements) from a list? 如何以简单的方式删除所有 discord 角色? - How do I delete all discord roles the simple way? 更快地删除 Salesforce 中的联系人 (Simple_Salesforce) - Faster way to delete Contact in Salesforce (Simple_Salesforce) Python:有没有直接简单的方法来删除一行a.csv文件,而不需要读-删除-重写过程? - Python: Is there a direct simple way to delete a row of a .csv file without the read-delete-rewrite process? 有没有办法在 GCP 中禁用服务帐户密钥 8 小时或 7 天,然后使用 python 执行删除操作? - Is there a way to disable service account key in GCP for 8hrs or 7 days and then do a delete operation using python?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM