BLOG

A LITTLE STORY ABOUT MY JOURNEY

Check if user belongs to a group in django templates Templatetags

So here comes a simple template filter which checks if the user belongs to a given group. It can be easily extended to take into account more groups. – See more at: http://www.abidibo.net/blog/2014/05/22/check-if-user-belongs-group-django-templates/#sthash.i1cF0nIZ.dpuf

And in your template you can use it this way: