#35035: BaseFormSet should try to use provided Form's default_renderer before
defaulting to get_default_renderer()
--------------------------------------------+------------------------
               Reporter:  Christophe Henry  |          Owner:  nobody
                   Type:  Bug               |         Status:  new
              Component:  Uncategorized     |        Version:  4.2
               Severity:  Normal            |       Keywords:
           Triage Stage:  Unreviewed        |      Has patch:  0
    Needs documentation:  0                 |    Needs tests:  0
Patch needs improvement:  0                 |  Easy pickings:  0
                  UI/UX:  0                 |
--------------------------------------------+------------------------
 When creating a `BaseFormSet` using a subclass `Form` that defines
 `default_renderer` to a custom, it's a bit disturbing that the
 `BaseFormSet` does not try to use this renderer before defaulting to
 `get_default_renderer()`. This requires the user to always explicitely
 specify the renderer when subclassing `BaseFormSet` or using
 `formset_factory`, which is error prone.

 I propose the following: when instanciating a `BaseFormSet`, if
 `self.renderer` is `None`, instanciate an empty form with
 `self.empty_form` (the form's `default_renderer` may be a property) to get
 the form's `default_renderer`. If this one is `None`, default to
 `get_default_renderer()`.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/35035>
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/0107018c64468dcb-f37acc2d-8102-4d5e-802e-8a6b955ef158-000000%40eu-central-1.amazonses.com.

Reply via email to