On Wed, 2007-05-30 at 08:31 -0700, ringemup wrote:
[...]
> > So a "uniqueness" constraint on your model is not something that the
> > form framework is really in a position to check. Instead, what should
> > happen is you construct the model object and then call
> > object.validate(), which returns ValidationErrors if there are problems.
> > The validate() method on a model will have full access to the model
> > instance (including "self").
> 
> Do you then have to figure out which errors apply to which Form
> fields, and sort them out and assign them?  I haven't seen any sample
> code doing anything of this sort, so I'd be very interested to see how
> it works.

Since full model-aware validation doesn't exist yet, example code would
be premature. :-)

To sort of answer your question, however: yes, in the cases where you
are using model-aware validation as part of the form validation, you
would need to figure out the mapping back. We might be able to make some
things easier in form_for_model() cases, but, as I say, the code doesn't
exist yet, so any claims as to what actually happens would be
hypothetical.

At this point, all I can claim is that it's perfect -- not at all
useful, but perfect. Hypothetical constructs are good like that. :-)

Regards,
Malcolm


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to