I only want to show buttons based on a user group. In this example I have a list of buttons then an IF Statement that checks if the user is in the group 'Recruiter', if they are then it displays some additional buttons:
Is there an easier way to do this in the html, like
{% if request.user.groups == 'recruiter' %}
Views.py
fields = request.user.groups
if fields == 'Recruiter':
fields1 = 'True'
else: fields1 = ''
context['fields1'] = fields1
html
{% if fields1 %}
a bunch of buttons
{% endif %}