From 289eecb57e4b665b80a5596ccf8e3427ec119397 Mon Sep 17 00:00:00 2001 From: FUNNYDMAN Date: Wed, 31 Oct 2018 23:24:19 +0300 Subject: [PATCH] update development.py.template according to the actual settings --- .../settings/development.py.template | 35 ++++++++----------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/eshop/eshop_project/settings/development.py.template b/eshop/eshop_project/settings/development.py.template index c474522..f63a16c 100644 --- a/eshop/eshop_project/settings/development.py.template +++ b/eshop/eshop_project/settings/development.py.template @@ -1,25 +1,18 @@ -from .base import * -INTERNAL_IPS = ('127.0.0.1', ) +try: + from .base import * +except ImportError: + raise ImportError("Oops,can't find base settings") -# Debug toolbar -DEBUG_TOOLBAR_PANELS = ( - 'debug_toolbar.panels.versions.VersionsPanel', - 'debug_toolbar.panels.timer.TimerPanel', - 'debug_toolbar.panels.settings.SettingsPanel', - 'debug_toolbar.panels.headers.HeadersPanel', - 'debug_toolbar.panels.request.RequestPanel', - 'debug_toolbar.panels.sql.SQLPanel', - 'debug_toolbar.panels.staticfiles.StaticFilesPanel', - 'debug_toolbar.panels.templates.TemplatesPanel', - 'debug_toolbar.panels.cache.CachePanel', - 'debug_toolbar.panels.signals.SignalsPanel', - 'debug_toolbar.panels.logging.LoggingPanel', - 'debug_toolbar.panels.redirects.RedirectsPanel', -) - -MIDDLEWARE = MIDDLEWARE + [ - 'debug_toolbar.middleware.DebugToolbarMiddleware', -] +# configurations for django debug toolbar +INTERNAL_IPS = ('127.0.0.1',) +MIDDLEWARE = [ + 'debug_toolbar.middleware.DebugToolbarMiddleware' + ] + MIDDLEWARE +INSTALLED_APPS = INSTALLED_APPS + ['debug_toolbar'] +DEBUG_TOOLBAR_CONFIG = { + 'RESULTS_CACHE_SIZE': 50 +} DEFAULT_FROM_EMAIL = 'order@russian-programms.ru' CELERY_ALWAYS_EAGER = True +