@@ -17,14 +17,17 @@ class RoleInline(admin.TabularInline):
1717 model = Role
1818 raw_id_fields = ["person" , "email" ]
1919
20+ class GroupURLInline (admin .TabularInline ):
21+ model = GroupURL
22+
2023class GroupAdmin (admin .ModelAdmin ):
2124 list_display = ["acronym" , "name" , "type" , "role_list" ]
2225 list_display_links = ["acronym" , "name" ]
2326 list_filter = ["type" ]
2427 search_fields = ["acronym" , "name" ]
2528 ordering = ["name" ]
2629 raw_id_fields = ["charter" , "parent" , "ad" ]
27- inlines = [RoleInline ]
30+ inlines = [RoleInline , GroupURLInline ]
2831 prepopulated_fields = {"acronym" : ("name" , )}
2932
3033 def role_list (self , obj ):
@@ -101,8 +104,17 @@ def send_one_reminder(self, request, object_id):
101104
102105
103106admin .site .register (Group , GroupAdmin )
104- admin .site .register (GroupHistory )
105- admin .site .register (GroupURL )
107+
108+ class GroupHistoryAdmin (admin .ModelAdmin ):
109+ list_display = ["acronym" , "name" , "type" ]
110+ list_display_links = ["acronym" , "name" ]
111+ list_filter = ["type" ]
112+ search_fields = ["acronym" , "name" ]
113+ ordering = ["name" ]
114+ raw_id_fields = ["group" , "parent" , "ad" ]
115+
116+ admin .site .register (GroupHistory , GroupHistoryAdmin )
117+
106118class GroupMilestoneAdmin (admin .ModelAdmin ):
107119 list_display = ["group" , "desc" , "expected_due_date" , "time" ]
108120 search_fields = ["group__name" , "group__acronym" , "desc" ]
0 commit comments