How can I test whether Django is running in debug mode? -


my settings file has:

debug = true 

the obvious method:

if debug:     print 'debug' 

does not seem work:

global name 'debug' not defined 

as mentioned in comment, need do:

from django.conf import settings  print settings.debug 

Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -