Changes between Initial Version and Version 1 of SimpleDebugThroughExceptions


Ignore:
Timestamp:
Apr 19, 2007, 2:44:22 AM (18 years ago)
Author:
Dyadya Zed
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SimpleDebugThroughExceptions

    v1 v1  
     1Sometimes printing variable or object contents saves you a lot of time. It will work if you have DEBUG = True
     2 in your settings.py
     3
     4You can put in your views
     5
     6{{{
     7raise Exception(your_variable_here)
     8}}}
     9
     10to see variable data. It will work for dictionaries, lists, objects(you'll see references) etc
     11
     12Also you can list object attributes:
     13
     14{{{
     15raise Exception(dir(some_object))
     16}}}
     17
     18or all internal object fields:
     19
     20{{{
     21raise Exception(some_object.__dict__)
     22}}}
     23
     24information was found on [http://softwaremaniacs.org/forum/ Software Maniacs forums]
     25
     26
     27
Back to Top