Changeset bd72d5c for asadb/forms
- Timestamp:
- Sep 15, 2011, 3:34:54 PM (14 years ago)
- Branches:
- master, space-access, stable, stage, test-hooks
- Children:
- 5c68184
- Parents:
- ceaf3bd (diff), fbb362a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - git-author:
- Alex Dehnert <adehnert@…> (09/15/11 15:34:54)
- git-committer:
- Alex Dehnert <adehnert@…> (09/15/11 15:34:54)
- Location:
- asadb/forms
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
asadb/forms/views.py
rceaf3bd rbd72d5c 121 121 def select_group_fysm(request, ): 122 122 qobj = Q(activity_category__isnull = True) | ~(Q(activity_category__name='Dorm') | Q(activity_category__name='FSILG')) 123 queryset = groups.models.Group. objects.filter(qobj)123 queryset = groups.models.Group.active_groups.filter(qobj) 124 124 return select_group( 125 125 request, -
asadb/forms/admin.py
rbb674c2 rceaf3bd 22 22 admin.site.register(forms.models.FYSM, FYSMAdmin) 23 23 admin.site.register(forms.models.FYSMCategory, FYSMCategoryAdmin) 24 25 class Admin_GroupMembershipUpdate(admin.ModelAdmin): 26 list_display = ( 27 'pk', 28 'group', 29 'update_time', 30 'updater_name', 31 'updater_title', 32 'num_undergrads', 33 'num_grads', 34 'num_alum', 35 'num_other_affiliate', 36 'num_other', 37 ) 38 list_display_links = ('pk', 'group', ) 39 admin.site.register(forms.models.GroupMembershipUpdate, Admin_GroupMembershipUpdate) 40 41 class Admin_PersonMembershipUpdate(admin.ModelAdmin): 42 list_display = ( 43 'pk', 44 'username', 45 'update_time', 46 ) 47 list_display_links = ('pk', 'username', ) 48 admin.site.register(forms.models.PersonMembershipUpdate, Admin_PersonMembershipUpdate) -
asadb/forms/models.py
rbb674c2 rceaf3bd 135 135 preview.update_time = cls.never_updated 136 136 preview.save() 137 138 139 class GroupMembershipUpdate(models.Model): 140 update_time = models.DateTimeField(default=datetime.datetime.utcfromtimestamp(0)) 141 updater_name = models.CharField(max_length=30) 142 updater_title = models.CharField(max_length=30, help_text="You need not hold any particular title in the group, but we like to know who is completing the form.") 143 144 group = models.ForeignKey(groups.models.Group, help_text="If your group does not appear in the list above, then please email asa-exec@mit.edu.") 145 group_email = models.EmailField(help_text="The text of the law will be automatically distributed to your members via this list, in order to comply with the law.") 146 officer_email = models.EmailField() 147 148 membership_definition = models.TextField() 149 num_undergrads = models.IntegerField() 150 num_grads = models.IntegerField() 151 num_alum = models.IntegerField() 152 num_other_affiliate = models.IntegerField() 153 num_other = models.IntegerField() 154 155 membership_list = models.TextField(help_text="Member emails on separate lines (Athena usernames where applicable)") 156 157 compliance_statement = "By checking this, I hereby affirm that I have read and understand Chapter 269: Sections 17, 18, and 19 of Massachusetts Law. I furthermore attest that I will distribute to group members, pledges, and/or applicants, copies of Massachusetts Law 269: 17, 18, 19 and that our organization, group, or team agrees to comply with the provisions of that law. (See below for text.)" 158 no_hazing = models.BooleanField(help_text=compliance_statement) 159 160 161 class PersonMembershipUpdate(models.Model): 162 update_time = models.DateTimeField(default=datetime.datetime.utcfromtimestamp(0)) 163 username = models.CharField(max_length=30) 164 groups = models.ManyToManyField(groups.models.Group, help_text="By selecting a group here, you indicate that you are an active member of the group in question.<br>If your group does not appear in the list above, then please email asa-exec@mit.edu.<br>")
Note: See TracChangeset
for help on using the changeset viewer.