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 %}

builtins: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

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -