Opened 3 years ago
Closed 3 years ago
#33528 closed New feature (wontfix)
Add an option in ModelAdmin to validate data without saving anything.
Reported by: | Maxim Danilov | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | 4.0 |
Severity: | Normal | Keywords: | modeladmin, save |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
in django.contrib.admin.options ModelAdmin Change_view/Add_view exists "_saveasnew" in request.POST
But don't exists work with "_save"
i can imagine it in _changeform_view, row 1598:
if all_valid(formsets) and form_validated: if "_saveasnew" in request.POST or "_save" in request.POST or ... _addanother or _continue.... :
What i can achieve with that:
if '_save' is omitted, i can see in response without call save model and save fieldsets that all my forms and formsets are valid.
Right now it is not possible: or not valid, or save all and call self.response_{add or change}.
Change History (1)
comment:1 by , 3 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Summary: | "_save" in request.POST war newer used in ModelAdmin Change_view/Add_view → Add an option in ModelAdmin to validate data without saving anything. |
Note:
See TracTickets
for help on using tickets.
As far as I understand correctly, you would like to add an option to validate data without saving anything, however Django Admin is not a universal tool for building an app and adding a new option that is not used by Django Admin itself is always controversial.
Please first start a discussion on the DevelopersMailingList, where you'll reach a wider audience and see what other think, and follow the guidelines with regards to requesting features.