2

In Tornado i have a base template with x block similar below:

{% block x %} x {% end %}

And in second template that inherited from base template i want to mix old value by new value similar django template tag, that is similar below code:

{% block x %} » {{ block.super }} « {% endblock %}

But in Tornado i cant use {{ block.super }}.

Tornado framework has equal django block.super?

0

1 Answer 1

5

Tornado does not currently have any equivalent to Django's block.super. The simplest workaround is to move the part you want to reuse into a separate file so it can be included in both places with {% module Template('foo.html') %}

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.