mahmoud / ashes

⚱️ Lightweight, self-contained templating for Python 2 and 3, a la Dust templates
http://ashes.readthedocs.org
Other
55 stars 9 forks source link

Add @contextDump (or equivalent debugging capabilities) #10

Open mahmoud opened 11 years ago

mahmoud commented 11 years ago

Opened on behalf of @jvanasco, based on a comment on #4:

"I'd love to see the @contextDump helper extension. debugging is possible , but a bit of a pain , without it."

I'm curious, what aspects of @contextDump are most useful for you? Just seeing the rendering context/model (whatever it's called, the dictionary of data passed in)? Or do you want to see the codegen'd code and everything, like LinkedIn's apparently supports with key="full" and so forth. Personally I feel the latter is a bit overkill, but could see some simpler functionality as convenient.

jvanasco commented 11 years ago

Thanks for migrating this. I didn't want to open up another ticket, since it was mentioned elsewhere.

I think just showing the current rendering context/model is all that's needed.

However, playing around, I seem to get enough info via {.} , so this request might not be needed.