On Tue, Oct 21, 2008 at 11:39 AM, bobhaugen <[EMAIL PROTECTED]> wrote:
> > I mean the normal displayable and user-correctable form validation > errors, not the fatal database IntegrityError. > > I found > http://groups.google.com/group/django-users/browse_thread/thread/f0e245366b02411b/df6d03f32eb37f93 > and > http://www.djangosnippets.org/snippets/338/ > both more than a year old. > > In the first thread, Malcom Tredinnick says it's waiting for model- > aware validation. > > The problem with overriding clean() in a form to do this is that for > inlines, the parent foreign key value is missing, so you can't check > for an existing record with the unique_together values. > > This thread in django-developers explains the problem in more detail, > but also says "'wait for model-aware validation". It's also a year > old. > > http://groups.google.com/group/django-developers/browse_thread/thread/276fae9d4132225b/90324852d4e95426 > > Any more progress, workarounds or tips? > Have you tried whatever scenario you are particularly interested in on 1.0 or current code? Though general model validation did not make it into 1.0, checking of unique and unique_together was added in changeset [8805]. It may not cover the inline/missing parent foreign key value case, though -- I haven't tried that. Karen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---

