Commit cacb35ac authored by BERJON Matthieu's avatar BERJON Matthieu
Browse files

Deletion of the groups templatetags



The `groups` template tags has been deleted because it's not used
anymore (replaced by the `is_provider` method on the `User` model. I
updated the templates where this template tag was called.
Signed-off-by: BERJON Matthieu's avatarMatthieu Berjon <matthieu.berjon@inria.fr>
parent da66b198
from django import template
from django.contrib.auth.models import Group
register = template.Library()
@register.filter(name='has_group')
def has_group(user, group_name):
group = Group.objects.get(name=group_name)
return group in user.groups.all()
{% extends "base.html" %}
{% load static groups converters humanize %}
{% load static converters humanize %}
{% block title %}Available apps for tag {{ tag | title }}{% endblock %}
......
{% extends "base.html" %}
{% load static groups converters humanize %}
{% load static converters humanize %}
{% block title %}Available apps{% endblock %}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment