我想从分配给的所有组中删除一个用户。我正在使用Django中的标准auth应用程序。我知道这是一种多对多的关系,但我无法找到哪个模型代表多到多的映射,并从那里调用delete方法。我想使用Django ORM执行以下查询:
delete from auth_user_group where user_id = 123
join table "post_tags" is created
post.tags.all() # this will cause djangoto join "tag" with "post_tags"
post.tags.values('pk') # even though pk is already in post_tags, django