#19445: Fieldsets' validation doesn't call get_form
-------------------------------+--------------------
     Reporter:  KJ             |      Owner:  nobody
         Type:  Bug            |     Status:  new
    Component:  contrib.admin  |    Version:  1.4
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  1              |      UI/UX:  0
-------------------------------+--------------------
 In django.contrib.admin.validation, function check_formfield checks
 presence of a field based on "form" attribute on admin class. If get_form
 method is overriden and it returns form class which adds some additional
 fields, those cannot be used in "fieldsets" attribute because
 ImproperlyConfigured exception is raised.

 The workaround is to use undocumented get_fieldsets method to specify
 additional fields instead of "fieldsets" attribute.

 The easiest way to fix this would be probably to disable fieldsets'
 validation entirely (as we are not able to anticipate what will be the
 result of calling get_form) or to make get_fieldsets method a documented
 one and make a note that if we add fields in get_form, then we should not
 set "fieldsets" attribute.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/19445>
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to