V
V
Viktor Paperno2021-07-04 11:32:13
Django
Viktor Paperno, 2021-07-04 11:32:13

How to override save button functionality in Django admin?

How to override the functionality of the save button in the Django admin panel, so that if one of the model fields (published) is True, then the transition to the page of all objects is not performed?

That is, if published == True, then the same functionality is performed as if we clicked Save and continue editing.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
1
12LiCaNtRoP12, 2021-07-04
@12LiCaNtRoP12

I xs, will it work, but try to search in django (in the framework itself) a folder with templates, which describes a page with a save button and change the redirect to the same page.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question