We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi!
It would be nice to be able to hard delete objects from the Django admin. This can be done this way:
from django.contrib.admin import actions class SoftDeleteObjectAdmin(admin.ModelAdmin): actions = ['delete_selected', 'soft_undelete', 'hard_delete'] def delete_queryset(self, request, queryset): # https://github.com/django/django/blob/main/django/contrib/admin/actions.py#L45 super(queryset.__class__, queryset).delete() def hard_delete(self, request, queryset): return actions.delete_selected(self, request, queryset) hard_delete.short_description = 'Hard delete selected objects'
The text was updated successfully, but these errors were encountered:
how can be enable hard_delete button in admin
Sorry, something went wrong.
feat: scoursen#76 hard delete option in django admin
492cbfb
this is merged into the master branch, we can close this issue. @Vayel
No branches or pull requests
Hi!
It would be nice to be able to hard delete objects from the Django admin. This can be done this way:
The text was updated successfully, but these errors were encountered: