From 61d0372bfd7f3f821fd4060a173ac326c91db59e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89lie=20Bouttier?= Date: Sat, 9 Jul 2016 23:44:52 +0200 Subject: [PATCH] use is_orga --- accounts/templates/accounts/participation_list.html | 2 +- accounts/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/accounts/templates/accounts/participation_list.html b/accounts/templates/accounts/participation_list.html index 75f3143..4b32f2b 100644 --- a/accounts/templates/accounts/participation_list.html +++ b/accounts/templates/accounts/participation_list.html @@ -24,7 +24,7 @@ {{ forloop.counter }} {{ participation.user.username }} {{ participation.user.get_full_name }} - {{ participation.orga|yesno:"✔,✘" }} + {{ participation.is_orga|yesno:"✔,✘" }} {% for topic in participation.topic_set.all %}{{ topic.get_link }}{% if not forloop.last %}, {% endif %}{% endfor %} diff --git a/accounts/utils.py b/accounts/utils.py index a8c4ad8..c43d43e 100644 --- a/accounts/utils.py +++ b/accounts/utils.py @@ -16,4 +16,4 @@ def is_staff(request, user): def can_edit_profile(request, profile): editor = request.user.participation_set.get(site=get_current_site(request)) - return editor.orga or editor.user.topic_set.filter(talk__speakers=profile.user).exists() + return editor.is_orga() or editor.user.topic_set.filter(talk__speakers=profile.user).exists()