mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-29 02:31:00 +00:00
Add delete admin option
This commit is contained in:
parent
a7be3b2072
commit
9b5152723a
1 changed files with 6 additions and 1 deletions
|
@ -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 a new issue