else:
extra_where = 'NOT catalogue_tag.category = "set"'
tags = models.Tag.objects.usage_for_model(models.Book, counts=True, extra={'where': [extra_where]})
else:
extra_where = 'NOT catalogue_tag.category = "set"'
tags = models.Tag.objects.usage_for_model(models.Book, counts=True, extra={'where': [extra_where]})
if request.user.is_authenticated():
extra_where = '(NOT catalogue_tag.category = "set" OR catalogue_tag.user_id = %d)' % request.user.id
else:
extra_where = 'NOT catalogue_tag.category = "set"'
if request.user.is_authenticated():
extra_where = '(NOT catalogue_tag.category = "set" OR catalogue_tag.user_id = %d)' % request.user.id
else:
extra_where = 'NOT catalogue_tag.category = "set"'
- related_tags = models.Tag.objects.related_for_model(tags, models.Book, counts=True, extra={'where': [extra_where]})
+ related_tags = models.Tag.objects.related_for_model(tags, model, counts=True, extra={'where': [extra_where]})