Hi,
First of all, I'm using trunk :)
I have a couple of models like:
class User(model.Model):
group = models.ForeignKey(Group)
Class Group(model.Model):
interest = models.ForeignKey(Interests)
Basically i want to be possible to change in the admin the interest of
a Group *only if*:
self.user_set.count() == 0
The documentation is not very about custom validation, it says to pass
validator_list to the field definition, so i've tried with:
interest = models.ForeignKey(interests, validator_list = [ myvalidator ])
But it seems the custom validators are not called at all. Is this
possible? How do I perform custom validation on a specific form? Doing
it into the save() method of the model is not suitable (I want to
raise an error which is specific to a field and is displayed next to
the field itself)
Thanks
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---