#35696: ModelAdmin is overruling the fields of ModelForm
-------------------------------+--------------------------------------
     Reporter:  Jurrian Tromp  |                    Owner:  (none)
         Type:  Bug            |                   Status:  closed
    Component:  Forms          |                  Version:  4.2
     Severity:  Normal         |               Resolution:  invalid
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------
Changes (by Carlton Gibson):

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

Comment:

 This is the expected behaviour as far as I can see. The
 
[https://docs.djangoproject.com/en/5.1/ref/contrib/admin/#django.contrib.admin.ModelAdmin.form
 ModelAdmin.form docs] state that the `fields` meta option is ignored on
 any provided form. (The provided form class is used as the base, but
 fields are derived from the admin options `fields`/`fieldsets`.)

 If you want to bypass the form generation you should override
 `get_form()`.

 I'd suggest following up in TicketClosingReasons/UseSupportChannels if you
 need to dig further.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35696#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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107019173cf9ff0-892691e1-4467-4ea1-8f04-a81734c762ed-000000%40eu-central-1.amazonses.com.

Reply via email to