How do I get all the variables defined in a Django template? -
i'm new django , wonder if there way dump variables available template debugging purposes. in python might use locals()
, there equivalent default template engine?
note: suppose don't have access view purposes of question.
both ned's , blaine's answers good, if want achieve ask there's template tag it:
{% debug %}
more information in context_processor.debug including:
if processor enabled, every requestcontext contain debug , and sql_queries variables – if debug setting set true , request’s ip address (
request.meta['remote_addr']
) in internal_ips setting
similar peter g suggestion, use <div id="django-debug"><pre>{% debug|escape %}</pre></div>
block @ end of page has display:none
can inspect debug.
Comments
Post a Comment