#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 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>
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/0107018681f6228a-7d4d2e1f-ae9e-49ee-af79-fd854a6f8ed6-000000%40eu-central-1.amazonses.com.

Reply via email to