calebsmith / django-template-debug

A small collection of template tags for debugging and introspecting templates
BSD 3-Clause "New" or "Revised" License
74 stars 11 forks source link

Refs #31 - Adds render() for rendering template strings in set_trace #32

Closed calebsmith closed 9 years ago

calebsmith commented 9 years ago

As demonstrated in the docs changes, this function is used inside of a set-trace for the purpose of testing out template rendering of a given string. For instance, its user might type the following

ipdb> render(""" {% if something %} {{ varname.attr|filtername:"arg" }} {% endif %} """)

This passes the string through a template.Template and renders it with the current context.