#25880: Forms created by formset_factory's extra parameter don't have instance 
set
-------------------------------------+-------------------------------------
     Reporter:  karyon               |                    Owner:  Parth
         Type:                       |  Patil
  Cleanup/optimization               |                   Status:  assigned
    Component:  Forms                |                  Version:  1.8
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  1
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Parth Patil):

 * owner:  nobody => Parth Patil
 * status:  new => assigned
 * needs_docs:  0 => 1


Comment:

 Replying to [comment:2 Tim Graham]:
 > Conceptually it seems to make sense, though from a look at the code I
 couldn't tell if it's feasible. I guess I'll accept the ticket for further
 investigation.
 
[https://github.com/django/django/blob/0f2c2c104b51a226525d7e7baa65ea1fd27e994f/django/forms/models.py#L880-L895
 BaseInlineFormSet._construct_form()] seems to set the related instance
 after the form is initialized. If not, maybe it's worth a documentation
 note?

 Yes, I agree with Tim. Since `_construct_form()`  method does not assign
 the related object, I think it should be added and document note should
 also be present for earlier versions

-- 
Ticket URL: <https://code.djangoproject.com/ticket/25880#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/064.b544b310b68802dd11076dd5de809b21%40djangoproject.com.

Reply via email to