· 7 years ago · Jul 02, 2018, 10:16 PM
1from .base import * # noqa
2
3DEBUG = True
4
5INTERNAL_IPS = ["127.0.0.1"]
6
7SECRET_KEY = "secret"
8
9# DATABASE SETTINGS
10# https://docs.djangoproject.com/en/1.10/ref/settings/#databases
11DATABASES = {
12 'default': {
13 'ENGINE': 'django.db.backends.sqlite3',
14 'NAME': 'development.sqlite3',
15 'USER': '',
16 'PASSWORD': '',
17 'HOST': '',
18 'PORT': '',
19 },
20}
21
22CACHES = {
23 "default": {
24 "BACKEND": "django.core.cache.backends.dummy.DummyCache"
25 }
26}
27
28EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
29
30
31# DJANGO DEBUG TOOLBAR SETTINGS
32# https://django-debug-toolbar.readthedocs.org
33def show_toolbar(request):
34 return not request.is_ajax() and request.user and request.user.is_superuser
35
36MIDDLEWARE += ["debug_toolbar.middleware.DebugToolbarMiddleware", ]
37INSTALLED_APPS += ["debug_toolbar", ]
38
39DEBUG_TOOLBAR_CONFIG = {
40 'INTERCEPT_REDIRECTS': False,
41 'HIDE_DJANGO_SQL': True,
42 'TAG': 'body',
43 'SHOW_TEMPLATE_CONTEXT': True,
44 'ENABLE_STACKTRACES': True,
45 'SHOW_TOOLBAR_CALLBACK': 'DzenanElvir.settings.development.show_toolbar',
46}
47
48DEBUG_TOOLBAR_PANELS = (
49 'debug_toolbar.panels.versions.VersionsPanel',
50 'debug_toolbar.panels.timer.TimerPanel',
51 'debug_toolbar.panels.settings.SettingsPanel',
52 'debug_toolbar.panels.headers.HeadersPanel',
53 'debug_toolbar.panels.request.RequestPanel',
54 'debug_toolbar.panels.sql.SQLPanel',
55 'debug_toolbar.panels.staticfiles.StaticFilesPanel',
56 'debug_toolbar.panels.templates.TemplatesPanel',
57 'debug_toolbar.panels.cache.CachePanel',
58 'debug_toolbar.panels.signals.SignalsPanel',
59 'debug_toolbar.panels.logging.LoggingPanel',
60 'debug_toolbar.panels.redirects.RedirectsPanel',
61)
62
63try:
64 from local_settings import * # noqa
65except ImportError:
66 pass