Sometimes printing variable or object contents saves you a lot of time. It will work if you have DEBUG = True

in your settings.py

You can put in your views

raise Exception(your_variable_here)

to see variable data. It will work for dictionaries, lists, objects(you'll see references) etc

Also you can list object attributes:

raise Exception(dir(some_object))

or all internal object fields:

raise Exception(some_object.__dict__)

information was found on Software Maniacs forums

Last modified 17 years ago Last modified on Apr 19, 2007, 2:44:22 AM
Note: See TracWiki for help on using the wiki.
Back to Top