@register.filter(name='<STR_LIT>')<EOL>def has_group(user, group_name):
if user.groups.filter(name=group_name).exists():<EOL><INDENT>return True<EOL><DEDENT>return False<EOL>
This allows specification group-based permissions in templates.
In most instances, creating model-based permissions and giving
them to the desired group is preferable.