How to check (in template) if user belongs to a group
问题 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 to check this in base.html which is an extending template (it does not have it's own view function)? All of my templates extends base.html so it is not good to check it in each view . The base.html contains upper bar, which should contain buttons depending on in which group logged user is (Customers, Sellers). In my base.html is: {% if user.is_authenticated