[Python] Where can a save confirmation page be hooked into the Django admin? (similar to...

Discussão em 'Python' iniciado por Stack, Julho 25, 2025.

  1. Stack

    Stack Membro Participativo

    I want to emulate the delete confirmation page behavior before saving certain models in the admin. In my case if I change one object, certain others should be deleted as they depend upon the object's now out-of-date state.

    I understand where to implement the actual cascaded updates (inside the parent model's save method), but I don't see a quick way to ask the user for confirmation (and then rollback if they decide not to save). I suppose I could implement some weird confirmation logic directly inside the save method (sort of a two phase save) but that seems...ugly.

    Any thoughts, even general pointers into the django codebase?

    Thanks!

    Continue reading...

Compartilhe esta Página