Answer the question
In order to leave comments, you need to log in
How to remove the delete() method of a Django model?
How to delete or, failing that, override the delete() method of a model?
There is a need to prohibit the possibility of deleting objects. Perhaps there are other ways to prevent such actions. But, it is highly desirable that even superuser cannot delete an entry from the database using the web interface. I don’t consider the case of a direct request to the database, because if an attacker got direct access to the database, then the problems are much more serious.
Answer the question
In order to leave comments, you need to log in
Don't be bullshit. It is necessary to eliminate the causes, not the consequences.
I agree with Roman Kitaev . but if you really want to .....
on the model you need to override the delete method . to add such an opportunity to the user, use default permissions
for everyone, prohibit deletion and issue only to those who are in the admin group or trusted users
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question