我想像下面这样构造
modelName View Add Change Delete
Group Y Y Y Y
User Y Y Y Y
我使用来查找数据
user = User.objects.get(username='test')
perm = Permission.objects.filter(Q(group__user=user)|Q(user=user)).distinct()
现在返回
Model Permission
log entry view_logentry
Demo change_demopurpose
group add_group
group change_group
group delete_group
但需要分组