File tree 1 file changed +13
-0
lines changed
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 23
23
from patchwork .models import State
24
24
from patchwork .models import Tag
25
25
from patchwork .models import UserProfile
26
+ from patchwork .models import PatchAttentionSet
26
27
27
28
28
29
class UserProfileInline (admin .StackedInline ):
@@ -86,6 +87,17 @@ class CoverAdmin(admin.ModelAdmin):
86
87
admin .site .register (Cover , CoverAdmin )
87
88
88
89
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
+
89
101
class PatchAdmin (admin .ModelAdmin ):
90
102
list_display = (
91
103
'name' ,
@@ -99,6 +111,7 @@ class PatchAdmin(admin.ModelAdmin):
99
111
list_filter = ('project' , 'submitter' , 'state' , 'archived' )
100
112
list_select_related = ('submitter' , 'project' , 'state' )
101
113
search_fields = ('name' , 'submitter__name' , 'submitter__email' )
114
+ inlines = (PatchAttentionSetInline ,)
102
115
date_hierarchy = 'date'
103
116
104
117
def is_pull_request (self , patch ):
You can’t perform that action at this time.
0 commit comments