--
Ticket URL: <https://code.djangoproject.com/ticket/34365>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* Attachment "change_form_template.patch" added.
Patch file
* status: new => closed
* has_patch: 1 => 0
* resolution: => wontfix
Comment:
I don't see anything unexpected in this behavior. Moreover,
`render_change_form()` is a private API and proposed changes are backward
incompatible. Other than that, we have no other forms to choose.
--
Ticket URL: <https://code.djangoproject.com/ticket/34365#comment:1>
Comment (by Xander):
Replying to [comment:1 Mariusz Felisiak]:
> I don't see anything unexpected in this behavior. Moreover,
`render_change_form()` is a private API and proposed changes are backward
incompatible. Other than that, we have no other forms to choose.
I know this is probably not the solution, but I don't agree on that it is
not unexpected behavior. In order to use the default add template (when
also using `change_form_template`), you have to declare `add_form_template
= "admin/change_form.html"`, which is unexpected in the sense that it is
non-logical and counter-intuitive. It should just use that default unless
declared otherwise. Not replace both when only `change_form_template` is
declared in your `CommonModelAdmin` implemented class.
--
Ticket URL: <https://code.djangoproject.com/ticket/34365#comment:2>
Comment (by Mariusz Felisiak):
Replying to [comment:2 Xander]:
> In order to use the default add template (when also using
`change_form_template`), you have to declare `add_form_template =
"admin/change_form.html"`, which is unexpected in the sense that it is
non-logical and counter-intuitive. It should just use that default unless
declared otherwise. Not replace both when only `change_form_template` is
declared in your `CommonModelAdmin` implemented class.
The default change form is used when `add_form_template` is not declared.
When you change the `change_form_template` than it's used as a default for
`add_form_template`. I don't see anything "counter-intuitive" is this
behavior 🤔
Please [https://docs.djangoproject.com/en/stable/internals/contributing
/triaging-tickets/#closing-tickets follow the triaging guidelines with
regards to wontfix tickets] and take this to DevelopersMailingList (if you
don't agree) where you'll reach a wider audience and see what other think.
--
Ticket URL: <https://code.djangoproject.com/ticket/34365#comment:3>