#34365: add_form_template used as change_form_template when adding object when 
only
declaring change_form_template
-------------------------------------+-------------------------------------
     Reporter:  Xander               |                    Owner:  nobody
         Type:                       |                   Status:  closed
  Cleanup/optimization               |
    Component:  contrib.admin        |                  Version:  dev
     Severity:  Normal               |               Resolution:  wontfix
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

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>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701867e7bbaeb-87c6963d-d1a9-4969-8cc4-38eb1f260367-000000%40eu-central-1.amazonses.com.

Reply via email to