Add additional addon admin filters (#20341)
This commit is contained in:
Родитель
98cd287f52
Коммит
990e1af37a
|
@ -192,8 +192,20 @@ class AddonAdmin(AMOModelAdmin):
|
||||||
'reviewer_flags',
|
'reviewer_flags',
|
||||||
)
|
)
|
||||||
list_filter = (
|
list_filter = (
|
||||||
|
(
|
||||||
|
'created',
|
||||||
|
DateRangeFilter,
|
||||||
|
),
|
||||||
'type',
|
'type',
|
||||||
'status',
|
'status',
|
||||||
|
(
|
||||||
|
'addonuser__user__created',
|
||||||
|
DateRangeFilter,
|
||||||
|
),
|
||||||
|
(
|
||||||
|
'addonuser__user__banned',
|
||||||
|
admin.EmptyFieldListFilter,
|
||||||
|
),
|
||||||
(
|
(
|
||||||
'reviewerflags__auto_approval_disabled',
|
'reviewerflags__auto_approval_disabled',
|
||||||
admin.BooleanFieldListFilter,
|
admin.BooleanFieldListFilter,
|
||||||
|
@ -350,6 +362,9 @@ class AddonAdmin(AMOModelAdmin):
|
||||||
]
|
]
|
||||||
return custom_urlpatterns + urlpatterns
|
return custom_urlpatterns + urlpatterns
|
||||||
|
|
||||||
|
def get_rangefilter_addonuser__user__created_title(self, request, field_path):
|
||||||
|
return 'author created'
|
||||||
|
|
||||||
def authors_links(self, obj):
|
def authors_links(self, obj):
|
||||||
# Note: requires .transform(Addon.attach_all_authors) to have been
|
# Note: requires .transform(Addon.attach_all_authors) to have been
|
||||||
# applied to fill all_authors property and role on each user in it.
|
# applied to fill all_authors property and role on each user in it.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче