Финтех
- 1 ответ
- 0 вопросов
1
Вклад в тег
SELECT * FROM pybb_forum as ff,guardian_groupobjectpermission as gg, auth_permission as pp
WHERE codename = 'view_forum'
AND gg.group_id in (1,2,3)
AND gg.content_type_id = 9
AND ff.id = gg.object_pk
AND gg.permission_id = pp.id;
Forum.objects.extra(
tables = ['guardian_groupobjectpermission', 'auth_permission'],
where = [""" codename = "view_forum"
AND guardian_groupobjectpermission.group_id in (1,2,3)
AND guardian_groupobjectpermission.content_type_id = 9
AND pybb_forum.id = guardian_groupobjectpermission.object_pk
AND guardian_groupobjectpermission.permission_id = auth_permission.id
"""]
)