Add delete admin option
This commit is contained in:
parent
a7be3b2072
commit
9b5152723a
|
@ -124,11 +124,16 @@ class IdentityAdmin(admin.ModelAdmin):
|
|||
)
|
||||
return super().get_search_results(request, queryset, search_term)
|
||||
|
||||
@admin.action(description="Force Update")
|
||||
@admin.action(description="Force update")
|
||||
def force_update(self, request, queryset):
|
||||
for instance in queryset:
|
||||
instance.transition_perform("outdated")
|
||||
|
||||
@admin.action(description="Mark as deleted")
|
||||
def delete(self, request, queryset):
|
||||
for instance in queryset:
|
||||
instance.transition_perform("deleted")
|
||||
|
||||
@admin.display(description="ActivityPub JSON")
|
||||
def actor_json(self, instance):
|
||||
return instance.to_ap()
|
||||
|
|
Loading…
Reference in New Issue