Changes between Initial Version and Version 2 of Ticket #15256


Ignore:
Timestamp:
Feb 10, 2011, 2:05:43 AM (14 years ago)
Author:
Russell Keith-Magee
Comment:

When providing a bug report, you should spend less time tell us how to fix the problem, and more time explaining the problem itself. If you're going to provide a code sample, make it a code sample that demonstrates the problem.

I can't work out how to reproduce the problem from the instructions provided; closing invalid. Feel free to reopen if you want to provide a reproducible test case.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #15256

    • Property Resolutioninvalid
    • Property Status newclosed
  • Ticket #15256 – Description

    initial v2  
    11After the form is posted, if an empty form is generated, it will be completely empty rather than having the initial values specified on the form. I believe we can fix this by modifying `_construct_form` like so:
    2 
     2{{{
    33        if self.is_bound and i < self.initial_form_count():
    44            defaults['data'] = self.data
    55            defaults['files'] = self.files
    6 
     6}}}
    77And completely remove this chunk from _get_empty_form
    8 
     8{{{
    99        if self.is_bound:
    1010            defaults['data'] = self.data
    1111            defaults['files'] = self.files
    12 
     12}}}
    1313I don't know why an empty form should behave any differently after the formset has been bound... it only seems to be causing problems.
Back to Top