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 ?

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to