"The Form subclass’s clean() method. This method can perform any
validation that requires access to multiple fields from the form at
once."
So in your clean method you would grab the submitted inlines and check
them against the is_approved field on the Clip. I'm not a django
expert, but that's where I would start. Good luck.
:Marco
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
I will upload a patch and provide an example,
but I can't yet say when.
Best,
Mart Sõmermaa
On Jan 15, 8:10 pm, Gabriel Reis <gabriel...@gmail.com> wrote:
> Hey Marcos,
>
> In the clean() method of my ClipModelForm class I couldn't manage how to
> reach the ClipDescriptions that are coming from the inline
> ClipDescriptionInline. I think I can't validate there. I spent the whole day
> trying and I couldn't fix. Any help would be very handy!
>
> Thanks for your atention.
>
> Kind regards,
>
> Gabriel
>
> Gabriel de Carvalho Nogueira Reis
> Software Developer
> +44 7907 823942
>
> > django-users...@googlegroups.com<django-users%2Bunsu...@googlegroups.com>
After applying the patch you can override
def formsets_are_valid(self, formsets, form, form_is_valid,
instance,
request):
and do any complex validation you like. As it's rather arcane, I've
provided
an example based on your description at http://gist.github.com/296411
.
Hope that helps,