Reputation: 27806
I have some foreign keys to auth-User with on_delete=CASCADE
.
If someone deletes a user, Django displays this warning.
Is there a way to avoid this warning?
It would be great if I could avoid it for every ForeignKey indiviually.
Upvotes: 1
Views: 305
Reputation: 744
If you want to avoid it for every foreign key the easiest way would be to overwrite the default django/contrib/admin/templates/admin/delete_confirmation.html template by adding a custom delete_confirmation.html
template in your own project structure, there is documentation on doing this here.
Upvotes: 1