Changeset a8cd440 for asadb/groups


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/groups
Files:
1 added
2 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:
Note: See TracChangeset for help on using the changeset viewer.