Changeset 7a875d1 for asadb


Ignore:
Timestamp:
Nov 4, 2011, 2:33:31 AM (14 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, space-access, stable, stage, test-hooks
Children:
b928edc
Parents:
aa2aa58
git-author:
Alex Dehnert <adehnert@…> (11/04/11 02:33:31)
git-committer:
Alex Dehnert <adehnert@…> (11/04/11 02:33:31)
Message:

Add role descriptions to the account lookup page

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asadb/groups/views.py

    raa2aa58 r7a875d1  
    780780    office_holders = []
    781781
     782    visible_roles  = groups.models.OfficerRole.objects.filter(publicly_visible=True)
     783
    782784    initial = {}
    783785
     
    793795                group = groups.models.Group.objects.get(account_q)
    794796                office_holders = group.officers(person=username)
    795                 office_holders = office_holders.filter(role__publicly_visible=True)
     797                office_holders = office_holders.filter(role__in=visible_roles)
    796798            except groups.models.Group.DoesNotExist:
    797799                msg = "Group not found"
     
    809811        'msg':          msg,
    810812        'msg_type':     msg_type,
     813        'visible_roles':    visible_roles,
    811814    }
    812815    return render_to_response('groups/account_lookup.html', context, context_instance=RequestContext(request), )
Note: See TracChangeset for help on using the changeset viewer.