Showing posts with label access request. Show all posts
Showing posts with label access request. Show all posts

Wednesday, November 7, 2012

Django Tips: How To Get Current Variables Or Request

When developing django-apps, I often raise a ZeroDivisionError to stop the script at a certain point.

print 1/0

This makes especially sense to debug code which includes save or redirect commands.

This is also an easy possibility to access the current local vars or request at a certain point of your script via the django traceback.

You have to enable debugging in your django settings:

DEBUG = True