Opened 5 years ago

Closed 5 years ago

#31125 closed New feature (wontfix)

Add confirmation page or preview page to ModelAdmin's add_view/change_view.

Reported by: Giacomo Owned by: nobody
Component: contrib.admin Version: 3.0
Severity: Normal Keywords: admin, adminform, form
Cc: Giacomo Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: yes

Description

As the title says, it would be nice to show a confirmation page to the User when he intends to create or change instances on a ModelAdmin form.

At the moment a confirmation page is shown to the User only when a specific instance is going to be deleted. The same approach used in _delete_view(*args) could be introduced into _changeform_view(*args).

A User specific use-case could be:

  • The User specifies a ModelAdmin and overrides save_model(*args) to execute further operations after changes are saved to database, like executing Celery tasks
  • On the Admin frontend, the User wants to be sure that he's not going to submit the form wrongly.

Change History (3)

comment:1 by Giacomo, 5 years ago

The confirmation page could be shown optionally, a User could set a boolean variable on the admin class, like ask_confirmation or something similar, and accordingly to that variable, Django would show or not the confirmation/preview page.

comment:2 by Giacomo, 5 years ago

Cc: Giacomo added

comment:3 by Mariusz Felisiak, 5 years ago

Resolution: wontfix
Status: newclosed
Summary: Add confirmation page or preview page to ModelAdmin's add_view/change_viewAdd confirmation page or preview page to ModelAdmin's add_view/change_view.

I don't see a wide usage of confirmation pages when adding/editing objects. I see your use case but it's niche, IMO. We shouldn't ask users to confirm everything. Moreover an implementation can be tricky and error-prone. I don't think we should add a "big" features that would be disabled by default.

Note: See TracTickets for help on using tickets.
Back to Top