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
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 ?
--~--~-~--~~~---
2 matches
Mail list logo