Changeset 4260e2c


Ignore:
Timestamp:
Oct 12, 2011, 3:57:36 PM (14 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, space-access, stable, stage, test-hooks
Children:
43434f6
Parents:
1ed7e51
git-author:
Alex Dehnert <adehnert@…> (10/12/11 15:57:36)
git-committer:
Alex Dehnert <adehnert@…> (10/12/11 15:57:36)
Message:

Fix the display of number of confirmations

Location:
asadb
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • asadb/forms/views.py

    rc297267 r4260e2c  
    1515from django.forms import ModelForm
    1616from django.forms import ModelChoiceField, ModelMultipleChoiceField
     17from django.db import connection
    1718from django.db.models import Q, Count
    1819
     
    392393    def get_queryset(self):
    393394        group_updates = forms.models.GroupMembershipUpdate.objects.all()
    394         group_updates = group_updates.annotate(num_confirms=Count('group__personmembershipupdate__username', distinct=True))
     395        group_updates = group_updates.filter(
     396            group__personmembershipupdate__deleted__isnull=True,
     397            group__personmembershipupdate__valid__gt=0,
     398        )
     399        group_updates = group_updates.annotate(num_confirms=Count('group__personmembershipupdate'))
     400        #print len(list(group_updates))
     401        #for query in connection.queries: print query
    395402        return group_updates
    396403
  • asadb/template/membership/submitted.html

    r012d637 r4260e2c  
    55
    66<h2>Membership Information Submissions Received</h2>
     7
     8<p>Your group will show up here once <em>both</em> you submit an entry for your group, and at least one person (e.g., you) confirm membership.</p>
    79
    810<table class='pretty-table'>
     
    2729</table>
    2830
    29 <p>* These are approximate. It counts multiple times people who submitted several times, it includes non-students (if any confirmed), and it includes people who selected all the groups. We may or may not ever correct for these. However, if you want to be sure of the correct number, please contact <a href='mailto:asa-db@mit.edu'>the ASA Database team</a> and we'll be happy to look it up for you.</p>
     31<p>* These are approximate. They include people (hopefully not many) who selected all the groups. If you want to be sure of the correct number, please contact <a href='mailto:asa-db@mit.edu'>the ASA Database team</a> and we'll be happy to look it up for you.</p>
    3032
    3133{% endblock %}
Note: See TracChangeset for help on using the changeset viewer.