djangozinnia

'zinnia_tags' is not a valid tag library


I am trying to override the zinnia templates in my django project. I have placed the file base.html at \templates\zinnia\ with the following contents:

{% extends "base.html" %}
{% load zinnia_tags i18n  %}

{% block sidebar %}
Change.
{% endblock %}

But when I visit \weblog, I get the error :

TemplateSyntaxError at /weblog/
'zinnia_tags' is not a valid tag library: Template library zinnia_tags not found, tried django.templatetags.zinnia_tags,django.contrib.staticfiles.templatetags.zinnia_tags,django.contrib.humanize.templatetags.zinnia_tags,django.contrib.admin.templatetags.zinnia_tags,endless_pagination.templatetags.zinnia_tags,haystack.templatetags.zinnia_tags,notifications.templatetags.zinnia_tags,links.templatetags.zinnia_tags,allauth.account.templatetags.zinnia_tags,allauth.socialaccount.templatetags.zinnia_tags,django_comments.templatetags.zinnia_tags,mptt.templatetags.zinnia_tags,tagging.templatetags.zinnia_tags,zinnia.templatetags.zinnia_tags

I have tried this based on the idea mentioned in their mailing list

I have loaded the zinnia template dir in my settings.py. I am unable to figure out why I get the error.

Thanks for your answers in advance.


Solution

  • Due to https://github.com/Fantomas42/django-blog-zinnia/blob/f7b32fe49ecc365b13f20e8557b3a1cb6fb0df20/CHANGELOG#L25, you need to import zinnia, and not zinnia_tags.