Ignore:
Timestamp:
Aug 14, 2011, 8:28:33 PM (14 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, space-access, stable, stage, test-hooks
Children:
33b19c3
Parents:
aa6a940
git-author:
Alex Dehnert <adehnert@…> (08/14/11 19:42:20)
git-committer:
Alex Dehnert <adehnert@…> (08/14/11 20:28:33)
Message:

Add notes

There's currently no particularly good UI for adding new notes.
But it is possible, and viewing works fine

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asadb/groups/admin.py

    rb713ac7 r0bd161f  
    2525    date_hierarchy = 'update_date'
    2626    search_fields = [ 'id', 'name', 'abbreviation', 'officer_email', 'athena_locker', ]
     27
     28class Admin_GroupNote(VersionAdmin):
     29    list_display = (
     30        'pk',
     31        'author',
     32        'timestamp',
     33        'acl_read_group',
     34        'acl_read_offices',
     35        'group',
     36    )
     37    list_display_links = ('pk', 'timestamp', )
     38    list_filter = [
     39        'acl_read_group',
     40        'acl_read_offices',
     41    ]
     42    date_hierarchy = 'timestamp'
     43    search_fields = [
     44        'author',
     45        'group__name',
     46        'group__abbreviation',
     47        'group__officer_email',
     48        'group__athena_locker',
     49    ]
    2750
    2851class OfficerRoleAdmin(VersionAdmin):
     
    129152
    130153admin.site.register(groups.models.Group, GroupAdmin)
     154admin.site.register(groups.models.GroupNote, Admin_GroupNote)
    131155admin.site.register(groups.models.OfficerRole, OfficerRoleAdmin)
    132156admin.site.register(groups.models.OfficeHolder, OfficeHolderAdmin)
Note: See TracChangeset for help on using the changeset viewer.