Re: Saving forms without validation, and formsets

2014-03-19 Thread Carl Meyer
On 03/19/2014 06:58 AM, Chris Wilson wrote: >> This requires overrides of a few methods on the parent form: __init__() >> to create the formsets, is_valid() to ensure the formsets are valid too, >> has_changed() to see if formsets have changed, and save() to save >> formsets too. > > There's a few

Re: Saving forms without validation, and formsets

2014-03-19 Thread Chris Wilson
Hi all, As part of our test process we have code that automatically fills in forms with dummy values to make them valid. It fills in all required fields. This works well except for formsets. BaseModelFormSet.add_fields() adds a PK field to the form after it's created. It marks this field as n

Re: Saving forms without validation, and formsets

2014-03-19 Thread Chris Wilson
Hi Carl, On Tue, 18 Mar 2014, Carl Meyer wrote: On 03/18/2014 02:54 PM, Chris Wilson wrote: 1. GCBV and Vanilla Views do a great job for simple forms, but they leave out embedded formsets entirely. (For example our large form has repeating sections for employment history, education, etc.) It f

Re: Saving forms without validation, and formsets

2014-03-18 Thread Carl Meyer
Hi Chris, I've definitely faced similar issues. A few scattered thoughts below: On 03/18/2014 02:54 PM, Chris Wilson wrote: [snip] > 1. GCBV and Vanilla Views do a great job for simple forms, but they > leave out embedded formsets entirely. (For example our large form has > repeating sections for

Saving forms without validation, and formsets

2014-03-18 Thread Chris Wilson
Hi all, (Apologies if this belongs on django-users instead. To clarify, I'm interested in what appear to be potentially missing or useful features in Django, and whether it's worth implementing them and submitting pull requests, or creating separate reusable modules to implement them. I'm als