Ignore:
Timestamp:
Dec 16, 2012, 6:17:52 AM (13 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, space-access, stable, stage
Children:
bb61160
Parents:
cf43bea
git-author:
Alex Dehnert <adehnert@…> (12/16/12 06:14:01)
git-committer:
Alex Dehnert <adehnert@…> (12/16/12 06:17:52)
Message:

Membership: miscellaneous improvements to issues

  • Describe what, exactly, causes the various issue names mean (well, more exactly than "50%" supplies...)
  • Provide a version of /membership/admin/issues.csv that includes account numbers, for ease-of-fining
File:
1 edited

Legend:

Unmodified
Added
Removed
  • asadb/forms/views.py

    r6e247d3 rd6f8984  
    498498@permission_required('groups.view_group_private_info')
    499499def group_confirmation_issues(request, ):
     500    account_numbers = ("accounts" in request.GET) and request.GET['accounts'] == "1"
     501
    500502    active_groups = groups.models.Group.active_groups
    501503    group_updates = forms.models.GroupMembershipUpdate.objects.all()
     
    507509    buf = StringIO.StringIO()
    508510    output = csv.writer(buf)
    509     output.writerow(['group_id', 'group_name', 'issue', 'num_confirm', 'officer_email', ])
     511    fields = ['group_id', 'group_name', 'issue', 'num_confirm', 'officer_email', ]
     512    if account_numbers: fields.append("main_account")
     513    output.writerow(fields)
    510514
    511515    q_present = Q(id__in=group_updates.values('group'))
     
    514518    for group in missing_groups:
    515519        num_confirms = len(people_confirmations.filter(groups=group))
    516         output.writerow([
     520        fields = [
    517521            group.id,
    518522            group.name,
     
    520524            num_confirms,
    521525            group.officer_email,
    522         ])
     526        ]
     527        if account_numbers: fields.append(group.main_account_id)
     528        output.writerow(fields)
    523529
    524530    for group_update in group_updates:
     
    536542
    537543        for problem in problems:
    538             output.writerow([
     544            fields = [
    539545                group.id,
    540546                group.name,
     
    542548                num_confirms,
    543549                group.officer_email,
    544             ])
     550            ]
     551            if account_numbers: fields.append(group.main_account_id)
     552            output.writerow(fields)
    545553
    546554
Note: See TracChangeset for help on using the changeset viewer.