Hi,
I have a model  Owner and a model Relation.

class  Relation(models.Model):
    pet=models.CharField(max_length=2)
    owner = models.ForeignKey (Owner)

then I have a ModelForm

class RelationForm(ModelForm):
   class Meta:
       fields  = ('pet')

The application flow works like this: You create a Relation object
within the context of an Owner Object. There is a rule that says that
a owner cannot have two Relation with the same pet value. How can I
create a validation on the form that can check this rule. Basically,
How can i pass owner object that I have in the view when I call
RelationForm.is_valid()

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