I
I
Ivan Vasilenko2018-12-20 07:28:31
Django
Ivan Vasilenko, 2018-12-20 07:28:31

How to remove a message in django admin?

Good day. Help please with one problem. There are two models, a category and a related product model. I decided to experiment so that when deleting a category that has products, an error message pops up that it cannot be deleted. I wrote the code, everything works, the model is not deleted, but one problem arises. After clicking the add button, in addition to my message, a message about successful deletion also pops up, although the model has not been deleted. And in the last actions in the admin panel, it also says that the model has been deleted. How to remove these records of successful deletion and adding to the history of recent actions.5c1b1a55a5714144515527.png5c1b1a69cd5ce733202172.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question