tag_list = models.Tag.get_tag_list(tags)
tag = models.Tag.objects.get(name=query)
except models.Tag.DoesNotExist:
tag_list = models.Tag.get_tag_list(tags)
tag = models.Tag.objects.get(name=query)
except models.Tag.DoesNotExist:
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]})
tags=tags,
template_name='catalogue/tagged_book_list.html',
extra_context = {'categories': categories },
tags=tags,
template_name='catalogue/tagged_book_list.html',
extra_context = {'categories': categories },