"""
# get relevant books and their tags
objects = cls.tagged.with_all(tags)
- parents = objects.filter(html_file='').only('slug')
+ parents = objects.exclude(children=None).only('slug')
# eliminate descendants
l_tags = Tag.objects.filter(category='book',
slug__in=[book.book_tag_slug() for book in parents.iterator()])
@register_counter
def count_books():
- return Book.objects.exclude(html_file='').count()
+ return Book.objects.filter(children=None).count()
@register_counter
def count_books_parent():
- return Book.objects.filter(html_file='').count()
+ return Book.objects.exclude(children=None).count()
@register_counter
def count_books_root():