Login

Tag "pdb"

Snippet List

Updated - Template context debugger with (I)Pdb

Tag to inspect template context, filter to inspect variable. Originally by denis, [http://www.djangosnippets.org/snippets/1550/](http://www.djangosnippets.org/snippets/1550/). This just extracts variables from the context to locals for quicker access and autocompletion (When using ipdb). Additionally, 'vars' holds context keys for quick reference to whats available in the template.

  • template
  • debug
  • context
  • pdb
  • ipdb
Read More

Template context debugger with (I)Pdb

This allows you to set up a breakpoint anywhere in your template code, by simply writing {% pdb_debug %}. You can then access your context variables using context.get(..) at the pdb prompt. Optionally, install the ipdb package for colors, completion, and more (easy_install ipdb).

  • template
  • debug
  • context
  • pdb
  • ipdb
Read More

2 snippets posted so far.