Re: Acces to model object inside model

2006-11-17 Thread Waylan Limberg
On 11/17/06, Kamil Wdowicz <[EMAIL PROTECTED]> wrote: > > It is possible to access, and do a query inside models.py ? > > Something like this: > > class Tag(models.Model): > #props... > > def _get_count(self): > return Tag.objects.all().count() > > counter = property(_get_count

Acces to model object inside model

2006-11-16 Thread Kamil Wdowicz
It is possible to access, and do a query inside models.py ? Something like this: class Tag(models.Model): #props... def _get_count(self): return Tag.objects.all().count() counter = property(_get_count) Do you know what I mean ? --~--~-~--~~~---