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

c# - Farseer ContactListener is not working -

Automatically create pages in phpfox -

database - one php page with different contents and urls -