[Django] #33528: "_save" in request.POST war newer used in ModelAdmin Change_view/Add_view

59 views
Skip to first unread message

Django

unread,
Feb 18, 2022, 8:39:56 PM2/18/22
to django-...@googlegroups.com
#33528: "_save" in request.POST war newer used in ModelAdmin Change_view/Add_view
-------------------------------------+-------------------------------------
Reporter: Maxim | Owner: nobody
Danilov |
Type: New | Status: new
feature |
Component: | Version: 4.0
contrib.admin |
Severity: Normal | Keywords: modeladmin, save
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
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}.

--
Ticket URL: <https://code.djangoproject.com/ticket/33528>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Feb 21, 2022, 1:37:51 AM2/21/22
to django-...@googlegroups.com
#33528: Add an option in ModelAdmin to validate data without saving anything.
----------------------------------+--------------------------------------
Reporter: Maxim Danilov | Owner: nobody
Type: New feature | Status: closed
Component: contrib.admin | Version: 4.0
Severity: Normal | Resolution: wontfix
Keywords: modeladmin, save | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* resolution: => wontfix


Comment:

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
[https://docs.djangoproject.com/en/stable/ref/contrib/admin/#module-
django.contriab.admin 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
[https://docs.djangoproject.com/en/stable/internals/contributing/bugs-and-
features/#requesting-features follow the guidelines with regards to
requesting features].

--
Ticket URL: <https://code.djangoproject.com/ticket/33528#comment:1>

Reply all
Reply to author
Forward
0 new messages