Frage

This is related to this question: How do you debug Mako templates?

One response mentions the built in debugging system in Mako and there's a comment about how it works well in Pyramid. However, I have no idea how you'd incorporate what is mentioned into Pyramid as you never call Mako's template rendering method directly.

War es hilfreich?

Lösung

There is a pyramid setting to catch mako exceptions.

A small pyramid extensions targeting mako exceptions in pyramid.

If you want to get in touch with mako rendering method directly, you can go for a mako preprocessor.

sample code for this approach.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top