Show simple error messages when debug is True and debugging tools are not found

This commit is contained in:
Roberto Rosario
2012-01-25 02:55:58 -04:00
parent 7495026d69
commit 7eff8b77fc

View File

@@ -324,22 +324,19 @@ if DEVELOPMENT:
import rosetta
INSTALLED_APPS += ('rosetta',)
except ImportError:
#print 'rosetta is not installed'
pass
sys.stderr.write('DEBUG: rosetta is not installed\n')
try:
import django_extensions
INSTALLED_APPS += ('django_extensions',)
except ImportError:
#print 'django_extensions is not installed'
pass
sys.stderr.write('DEBUG: django_extensions is not installed\n')
try:
import debug_toolbar
#INSTALLED_APPS +=('debug_toolbar',)
except ImportError:
#print 'debug_toolbar is not installed'
pass
sys.stderr.write('DEBUG: debug_toolbar is not installed\n')
TEMPLATE_CONTEXT_PROCESSORS += ('django.core.context_processors.debug',)