I want to get a list of all Django auth user with a specific permission group, something like this:
user_dict = {
'queryset': User.objects.filter(permisson='blogger')
}
I cannot find out how to do this. How are the permissions groups saved in the user model?
This would be the easiest
I think for group permissions, permissions are stored against groups, and then users have groups linked to them. So you can just resolve the user - groups relation.
e.g.
Do not forget that specifying permission codename is not enough because different apps may reuse the same codename. One needs to get permission object to query Users correctly:
Code with imports: https://github.com/Dmitri-Sintsov/django-jinja-knockout/blob/master/django_jinja_knockout/models.py