How to check in template whether user belongs to some group?
It is possible in a view which is generating the template but what if I want
view
template
Although the answer given by mishbah is right but it didn't work for me.
I am using Django 2.2.7 and i figured out that register = template.Library() should be replaced with from django.template.defaultfilters import register.
register = template.Library()
from django.template.defaultfilters import register
i hope someone will find it useful.