In Django, how do I check if a user is in a certain group?
If a user belongs to a certain group or not, can be checked in django templates using:
{% if group in request.user.groups.all %}
"some action"
{% endif %}
I created a custom group in Django's admin site.
In my code, I want to check if a user is in this group. How do I do that?