(self)
return group_permissions
Set group cache.
Set group cache.
Set group cache .
def _get_group_cached_perms(self):
        """
        Set group cache.
        """
        if not self.group:
            return {}
        perms = Permission.objects.filter(group=self.group,)
        group_permissions = {}
        for perm in perms:
            group_permissions[
                (perm.object_id, perm.content_type_id, perm.codename, perm.approved,)
            ] = True
        return group_permissions
def _get_group_cached_perms ( self ) : if not self . group : return { } perms = Permission . objects . filter ( group = self . group , ) group_permissions = { } for perm in perms : group_permissions [ ( perm . object_id , perm . content_type_id , perm . codename , perm . approved , ) ] = True return group_permissions