Model validation is ticket #6845 , and is considered a 1.0 beta maybe- feature. I believe Honza's latest patch is just about complete, perhaps you could test it out, I believe it has docs.
On Jul 22, 10:36 am, "Alex Rades" <[EMAIL PROTECTED]> wrote: > Hi, > sorry for posting this here, but this deals with some design decision > taken which I don't understand (and I couldn't understand from > discussion on -users) > > 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 the interest field of a > Group *only if*: > > self.user_set.count() == 0 > > The current documentation talks about validator_list, which doesn't > seem to be working at the moment. > > So, I need to perform custom validation on a specific field. Doing it > into the save() method of the model is not suitable (I want to raise > an error which is specific to the field and, for example in the admin, > is displayed next to the field itself. > > Is there a way to do this? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" 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-developers?hl=en -~----------~----~----~----~------~----~------~--~---
