Merlin
Merlin

Reputation: 25639

Combining Tornado and Flask templates

Is possible to combine Tornado and Flask web templates together?

For example: Use Index.html as "base" template setting up block for extensions:

Then ,extend index with "block" from Flask for Flask Routes Then, extend index with "block" from Tornado for Tornado Routes..

Upvotes: 0

Views: 433

Answers (2)

Markus Unterwaditzer
Markus Unterwaditzer

Reputation: 8244

You are not bound to the default template engine in Flask. Maybe you could somehow use Tornado's template engine in Flask, then it'd be possible to use the templates in both.

Upvotes: 1

nathancahill
nathancahill

Reputation: 10850

Tornado templates uses syntax similar to Jinja, but the rendering engine is not Jinja. You might be able to get away with it, but then you would have to keep track of which templates are Jinja and which are Tornado.

For the sake of sanity, just keep them separate.

Upvotes: 2

Related Questions