Hi,
I have a model with a unique_together field set. I also have a form
for that model that excludes one field - but I still need the
uniqueness to stay.
Example:
class A(models.Model):
name = models.CharField(max_length=30)
friend = models.ForeignKey(Friend)
and the form:
class AForm(ModelForm):
class Meta:
model = Event
fields = ('name')
that is, someone editing A can change the name, but they can't get to
a case that one friend have the same A's name.
>From what I gather, the is_valid passes since I excluded friend from
the form, but that's exactly the case I want.. it also makes sense.
Do you agree with opening a ticket? What do you think?
--
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.