#33703: ModelAdmin.get_fields wrong work with ModelAdmin.fieldsets statement
-----------------------------------+--------------------------------------
     Reporter:  Maxim Danilov      |                    Owner:  nobody
         Type:  Uncategorized      |                   Status:  closed
    Component:  contrib.admin      |                  Version:  4.0
     Severity:  Normal             |               Resolution:  invalid
     Keywords:  admin, modeladmin  |             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:   => invalid


Comment:

 Thanks for the report, however as far as I'm aware `get_fields()` works as
 intended and
 
[https://docs.djangoproject.com/en/stable/ref/contrib/admin/#django.contrib.admin.ModelAdmin.get_fields
 documented], it's a hook which allows specifying fields dynamically. It
 returns `ModelAdmin.fields` or base fields and readonly-fields, if not
 specified.

 It shouldn't check fieldsets definition, but the other way around,
 fieldsets should check specified fields. That's why you're getting an
 infinite recursion. Moreover `fields=None` was added intentionally in
 23e1b59cf2ad6a75637dd0273973e657e48e317e.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33703#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/01070180bbe42b7a-b340f807-a960-4b0d-9246-ca08e3a91f35-000000%40eu-central-1.amazonses.com.

Reply via email to