Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(0)  |  Derive(1)  |  Import(1)

src/b/o/boar-HEAD/boar/articles/managers.py   boar(Download)
from boar.cacher.managers import CachingManager, CachingQuerySet
from django.contrib.comments.models import Comment
from django.contrib.contenttypes.models import ContentType
from django.db import connection
from django.db.models.query import QuerySet
class ArticleQuerySet(CachingQuerySet):
    def comment_count(self):
        qn = connection.ops.quote_name
        ctype = ContentType.objects.get_for_model(self.model)
        subquery = """SELECT COUNT(*)