Using Django 1.7.1 under Python 3.4, I have a problem where I did not find any answer to, despite seeming banal, andhaving seen many similar problems all over the internet. No solution that I understood thus far.
I have a simple django template, boiled down to the essential part. It is a simle "trans"-tag translated string within a content block that overrides the admin/base content block.
{% extends "admin/base.html" %}
{% block content %}
{% trans "Entries" %}
{% endblock %}
With this I get a TemplateSyntaxError:
Invalid block tag: 'trans', expected 'endblock'
What I learned until now it that you need to use a blocktrans for something like that. But I don't get it - WHY the heck does this not work?
Funny thing is, if I replace the {% trans "Entries" %}
with a {{ _("Entries") }}
everything works as expected.
But I need the additional benefits you get with the trans tag.
There are plenty of examples, like here, which use exactly that pattern above - and it whould work. Any help welcome.