@@ -16,7 +16,36 @@ class RemoteRepositoryAdmin(admin.ModelAdmin):
16
16
17
17
"""Admin configuration for the RemoteRepository model."""
18
18
19
+ readonly_fields = ('created' , 'modified' ,)
19
20
raw_id_fields = ('organization' ,)
21
+ list_select_related = ('organization' ,)
22
+ list_filter = ('vcs_provider' , 'vcs' , 'private' ,)
23
+ search_fields = ('name' , 'full_name' , 'remote_id' ,)
24
+ list_display = (
25
+ 'id' ,
26
+ 'full_name' ,
27
+ 'html_url' ,
28
+ 'private' ,
29
+ 'organization' ,
30
+ 'get_vcs_provider_display' ,
31
+ 'get_vcs_display' ,
32
+ )
33
+
34
+
35
+ class RemoteOrganizationAdmin (admin .ModelAdmin ):
36
+
37
+ """Admin configuration for the RemoteOrganization model."""
38
+
39
+ readonly_fields = ('created' , 'modified' ,)
40
+ search_fields = ('name' , 'slug' , 'email' , 'url' , 'remote_id' ,)
41
+ list_filter = ('vcs_provider' ,)
42
+ list_display = (
43
+ 'id' ,
44
+ 'name' ,
45
+ 'slug' ,
46
+ 'email' ,
47
+ 'get_vcs_provider_display' ,
48
+ )
20
49
21
50
22
51
class RemoteRepositoryRelationAdmin (admin .ModelAdmin ):
@@ -37,5 +66,5 @@ class RemoteOrganizationRelationAdmin(admin.ModelAdmin):
37
66
38
67
admin .site .register (RemoteRepository , RemoteRepositoryAdmin )
39
68
admin .site .register (RemoteRepositoryRelation , RemoteRepositoryRelationAdmin )
40
- admin .site .register (RemoteOrganization )
69
+ admin .site .register (RemoteOrganization , RemoteOrganizationAdmin )
41
70
admin .site .register (RemoteOrganizationRelation , RemoteOrganizationRelationAdmin )
0 commit comments