DEBUG_ENV = os.environ.get('DEBUG') == 'True'
DEBUG = DEBUG_ENV
+DEBUG_TOOLBAR = False
TEMPLATE_DEBUG = DEBUG
RECOVERY = False
)),
)
-MIDDLEWARE = (('debug_toolbar.middleware.DebugToolbarMiddleware',) if DEBUG else ()) + (
+MIDDLEWARE = (('debug_toolbar.middleware.DebugToolbarMiddleware',) if DEBUG_TOOLBAR else ()) + (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
)
-if DEBUG:
+if DEBUG_TOOLBAR:
INSTALLED_APPS += ('debug_toolbar',)
TEMPLATES = [
ORAL_OPTION_PRICE = 250
-if DEBUG:
+if DEBUG_TOOLBAR:
def show_toolbar(request):
return True
DEBUG_TOOLBAR_CONFIG = {
import os
from django.conf.urls import include, url
+from django.conf import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
from django.http import HttpResponse
js_info_dict = ['teleforma']
-DEBUG_ENV = os.environ.get('DEBUG') == 'True'
-
-if DEBUG_ENV:
+if settings.DEBUG_TOOLBAR:
import debug_toolbar
urlpatterns = [
#url(r'^pdfviewer/', include('webviewer.urls')),
url(r'^pdfannotator/', include('pdfannotator.urls')),
url(r'^messages/', include('postman.urls', namespace='postman')),
-] + ([url(r'^__debug__/', include(debug_toolbar.urls)),] if DEBUG_ENV else [])
+] + ([url(r'^__debug__/', include(debug_toolbar.urls)),] if settings.DEBUG_TOOLBAR else [])