Changeset a8cd440


Ignore:
Timestamp:
Jan 23, 2012, 3:37:25 AM (14 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, space-access, stable, stage
Children:
96754f0
Parents:
777e9b2
git-author:
Alex Dehnert <adehnert@…> (01/23/12 03:37:25)
git-committer:
Alex Dehnert <adehnert@…> (01/23/12 03:37:25)
Message:

Data verification infrastructure (Trac: #22)

This includes:

  • a script to remove data that we want people to verify (groups/purge_for_transition.py)
  • code to make more fields required in the normal update interface
  • explanatory message to help people with problematic constitutions
  • adding an "Other" activity category so we can require that field
Location:
asadb
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • asadb/groups/fixtures/initial_data.xml

    rc060d8c ra8cd440  
    4343        <field type="CharField" name="name">Technology</field>
    4444    </object>
     45    <object pk="15" model="groups.activitycategory">
     46        <field type="CharField" name="name">Other</field>
     47    </object>
    4548</django-objects>
  • asadb/groups/views.py

    r8481152 ra8cd440  
    2121from django.db import connection
    2222from django.db.models import Q
     23from django.utils.safestring import mark_safe
    2324
    2425import form_utils.forms
     
    110111            value = getattr(self.instance, field_name)
    111112            StaticWidget.replace_widget(formfield, value)
     113        for field in self.force_required:
     114            self.fields[field].required = True
     115        self.fields['constitution_url'].help_text = mark_safe("Please put your current constitutional URL, if you have one.<br>If your constitution is currently an AFS path, you can either use the corresponding web.mit.edu (e.g., http://web.mit.edu/locker/path/to/const.html) or stuff.mit.edu path, or just use http://asa.mit.edu/const/afs/your-afs-path.<br>If you don't currently know where your constitution is, put http://asa.mit.edu/const/missing/.<br>(In either of the http://asa.mit.edu/const/ cases, we'll get in touch with you later about putting something better in.)")
    112116
    113117    exec_only_fields = [
     
    119123        'recognition_date',
    120124    ]
     125    force_required = [
     126        'activity_category', 'description',
     127        'num_undergrads', 'num_grads', 'num_community', 'num_other',
     128        'website_url', 'officer_email', 'group_email',
     129        'constitution_url', 'athena_locker',
     130    ]
     131
    121132
    122133    class Meta:
  • asadb/template/groups/group_change_main.html

    rfbb362a ra8cd440  
    66
    77<h1>{{group.name}}: Change main information</h1>
     8
     9<p>We're using the transition from the old ASA Database to this new one as an opportunity to verify that old information is still accurate. Thus, we have intentionally limited the amount of information we copied from the old database. While filling this out, feel free to refer to the <a href='https://sisapp2.mit.edu/asa/student_group_detail.do?action=detail&amp;studentGroupId={{group.pk}}'>old database</a>. However, please verify that information is accurate as you copy it over. As always, if you have trouble, please <a href='mailto:asa-exec@mit.edu'>contact us</a>.</p>
    810
    911{% if msg %}
Note: See TracChangeset for help on using the changeset viewer.