favo wrote:
>class Category(models.Model):
> """ Inhert Category """
>
> title_en = models.CharField(maxlength=256, null=True)
>
> parent = models.ForeignKey('self', related_name="direct_children",
> null=True, blank=True, validator_list=[self.isValidParent]) #
>we want the instance method here
>
>
I may be well mistaken but I think you can't do that. Because when class
is constructed an instance doesn't exist yet. If you need a validator
that works on an instance you may create it in a manipulator. When a
manipulator is called an instance is already known.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---