Changeset 243437e
- Timestamp:
- Aug 15, 2011, 12:50:47 AM (14 years ago)
- Branches:
- master, space-access, stable, stage, test-hooks
- Children:
- 386ea2a
- Parents:
- 6032bec
- git-author:
- Alex Dehnert <adehnert@…> (08/15/11 00:50:47)
- git-committer:
- Alex Dehnert <adehnert@…> (08/15/11 00:50:47)
- Location:
- asadb
- Files:
-
- 2 edited
-
groups/views.py (modified) (2 diffs)
-
template/index.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
asadb/groups/views.py
r6032bec r243437e 36 36 current_officers = groups.models.OfficeHolder.current_holders.filter(person=username) 37 37 users_groups = groups.models.Group.objects.filter(officeholder__in=current_officers).distinct() 38 if len(users_groups) == 0:39 groupmsg = "You do not currently appear to be listed with any groups."40 38 41 39 perms = [] … … 48 46 if request.user.has_perm('groups.%s' % (perm_name, )): 49 47 has_perms.append((perm_name, perm_desc, )) 50 else: 51 groupmsg = "Log in to see the groups that you are listed with." 48 52 49 context = { 53 50 'groups': users_groups, -
asadb/template/index.html
r33b19c3 r243437e 17 17 <h2>My Groups</h2> 18 18 19 {% if groupmsg %} 20 <p>{{groupmsg}}</p> 19 {% if user.is_anonymous %} 20 <p><a href='{% url login %}'>Login</a> to see your groups.</p> 21 {% else %} 22 {%if not groups %} 23 <p>You do not currently appear to be listed with any groups.</p> 24 {% endif %} 21 25 {% endif %} 22 26
Note: See TracChangeset
for help on using the changeset viewer.