views:

229

answers:

2

Is there a template tag (or any other trick) I can use to display all the variables available in a page?

+2  A: 

The debug toolbar does all this and much, much more. See the screencast for more. If you literally just want the variables, you could try

assert False, locals()

in your view

Tom
Thnaks. As I'm using a generic view, is there a way to summon a "assert False, locals()"
eaman
+2  A: 

If DEBUG is enabled, there's a template tag called {% debug %}

Keryn Knight