File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 2323from patchwork .models import State
2424from patchwork .models import Tag
2525from patchwork .models import UserProfile
26+ from patchwork .models import PatchAttentionSet
2627
2728
2829class UserProfileInline (admin .StackedInline ):
@@ -86,6 +87,17 @@ class CoverAdmin(admin.ModelAdmin):
8687admin .site .register (Cover , CoverAdmin )
8788
8889
90+ class PatchAttentionSetInline (admin .StackedInline ):
91+ model = PatchAttentionSet
92+ fields = ('user' ,)
93+ extra = 0
94+ verbose_name = 'user'
95+ verbose_name_plural = 'attention set users'
96+
97+ def has_change_permission (self , request , obj = None ):
98+ return False
99+
100+
89101class PatchAdmin (admin .ModelAdmin ):
90102 list_display = (
91103 'name' ,
@@ -99,6 +111,7 @@ class PatchAdmin(admin.ModelAdmin):
99111 list_filter = ('project' , 'submitter' , 'state' , 'archived' )
100112 list_select_related = ('submitter' , 'project' , 'state' )
101113 search_fields = ('name' , 'submitter__name' , 'submitter__email' )
114+ inlines = (PatchAttentionSetInline ,)
102115 date_hierarchy = 'date'
103116
104117 def is_pull_request (self , patch ):
You can’t perform that action at this time.
0 commit comments