Add "mark as done" admin action for books

This commit is contained in:
Gabriel Augendre 2020-06-30 13:00:36 +02:00
parent 406b700ede
commit 0bdbe79828
No known key found for this signature in database
GPG key ID: 1E693F4CE4AEE7B4

View file

@ -157,7 +157,11 @@ class BookAdmin(ExportMixin, admin.ModelAdmin):
update_with_decitre.short_description = 'Mettre à jour avec Decitre' update_with_decitre.short_description = 'Mettre à jour avec Decitre'
actions = [update_with_decitre] def mark_as_done(self, request, queryset):
queryset.update(done=True)
mark_as_done.short_description = "Marquer comme traité"
actions = [update_with_decitre, mark_as_done]
@admin.register(Editor) @admin.register(Editor)