From e24ae338d1db9d16dc4eec539aa20f57b23921ab Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Tue, 11 Jan 2011 14:44:40 +0000 Subject: [PATCH] Pass the description to the template --- groups/views.py | 2 +- templates/groups/group_list.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/groups/views.py b/groups/views.py index 4442163..30c9000 100644 --- a/groups/views.py +++ b/groups/views.py @@ -53,7 +53,7 @@ def group_list(request): fixed = not group.groupinformation.type == GROUP_TYPE_PERMISSION pending = group.requests.filter(status=REQUEST_PENDING,user=request.user).count() - group_list.append((group.id, group.name, status, requestable, fixed, pending)) + group_list.append((group.id, group.name, group.description, status, requestable, fixed, pending)) return render_to_response('groups/group_list.html', locals(), context_instance=RequestContext(request)) diff --git a/templates/groups/group_list.html b/templates/groups/group_list.html index c508bf0..ebd0ae0 100644 --- a/templates/groups/group_list.html +++ b/templates/groups/group_list.html @@ -9,9 +9,9 @@ {% if group_list %} -{% for id, group, status, requestable, fixed, pending in group_list %} +{% for id, group, description, status, requestable, fixed, pending in group_list %} - +
Group NameDescriptionStatusActions
{{ group }}{{ group.description }}{{ description }} {% if pending %}Request Pending{% else %}{% if status %}{{ status }}{% endif %}{% endif %} {% ifequal status None %}{% if requestable %}Request Membership{% endif %}{% endifequal %} {% if not fixed and status %}Leave {% endif %}