Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » Clean method across multiple models? [RSS Feed]

#1 June 17, 2010 01:50:58

J.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Clean method across multiple models?


Hello all,

Is there a sane way to make a clean method that depends on fields
from across multiple models?

I've got a view that uses two form classes and want to write custom
validation that checks clean_data fields in both models and I'm
looking for an example of such.

TIA,
John

http://docs.djangoproject.com/en/1.1/ref/forms/validation/#s-cleaning-and-validating-fields-that-depend-on-each-other--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 June 19, 2010 11:20:27

d.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Clean method across multiple models?


On Jun 17, 2:50 am, JHeasly <jhea...@earthlink.net> wrote:
> Hello all,
>
> Is there a sane way to make a clean method that depends on fields
> from across multiple models?
>
> I've got a view that uses two form classes and want to write custom
> validation that checks clean_data fields in both models and I'm
> looking for an example of such.
>
> TIA,
> John
>
> http://docs.djangoproject.com/en/1.1/ref/forms/validation/#s-cleaning...

John

Some actual code examples showing what you are trying to achieve would
help...

Bear in mind that "cleaning" relates to form data and not models per
se (as per the example you point to).

Derek

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

Offline

  • Root
  • » Django
  • » Clean method across multiple models? [RSS Feed]

Board footer

Moderator control

Enjoy the 15th of December
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support