On Tue, Dec 30, 2008 at 2:21 PM, hotani <hot...@gmail.com> wrote:

>
> -- Update --
>
> If I make the clean method for 'county', it works. I guess county
> comes after case_no so both are accessible by that time. Weird, but I
> can deal with it. However, that brings me to the 2nd issue with this
> process: Whatever is accessed in the clean method is no longer
> accessible for writing to the database.
>
> If the form clears - everything checks out and I'm ready to write the
> data, "county" is no longer available and a ValueError is returned
> because the field does not accept NULL values. I know I'm missing
> something here, and the docs are terribly sparse on this topic.
>

For multi-field validation, please read:

http://docs.djangoproject.com/en/dev/ref/forms/validation/

especially:

http://docs.djangoproject.com/en/dev/ref/forms/validation/#cleaning-and-validating-fields-that-depend-on-each-other

I do not know what this second problem you are referring to is.  If the form
passes validation than it doesn't make any sense that some of the data
"isn't accessible".  Some examples of the code you are trying may help
pinpoint what is going wrong.

Karen

--~--~---------~--~----~------------~-------~--~----~
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