The current screen I'm working on has a lot of data on it, with most
of the fields not being required. However it seems like all of my data
gets lost as soon as I submit the screen, even though a lot of the
data does not have any errors, none of the data appears to come back
to the screen for the stuff that is correct and I again see error
messages for all of the fields, even though I had previously entered a
lot of data that should have passed all of their respective edits. I
also seem to be seeing fields that are marked as not required showing
other errors, like for min_length, etc. How do I get past this? Are
all of the edits run for fields, even when they're not marked as
required?

On Mar 18, 12:28 pm, Shawn Milochik <sh...@milochik.com> wrote:
> On Fri, Mar 18, 2011 at 12:55 PM, hank23 <hversem...@stchas.edu> wrote:
> > The order or priority of the fields are not important, but having a
> > minimum of at least one is,
>
> If that's the case, then just don't make any of those fields required,
> then in the clean() of your form check the cleaned_data to ensure that
> at least one is populated. Pro tip: Remember to return
> self.cleaned_data in the end of your clean() method or you'll wonder
> why everything breaks. I've done it.
>
> Shawn

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to