删除用户 Posted on 2022-07-30 删除用户 12345678910def userdelete(request): # 获取通过网址要穿过来的要删除的id delete_id = request.GET.get('delete_id') # print(delete_id) # 通过id查找到要删除的用户名和密码 delete_obj=models.User.objects.filter(id=delete_id).delete() # print(delete_obj) # 返回到展示页面 return redirect('/userlist/')