{% for group in user.groups.all %} {% if group.name == 'Superadmin' %} {% endif %}{% endfor %}