Advertisement
Guest User

development.py

a guest
Jul 2nd, 2018
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.83 KB | None | 0 0
  1. from .base import *  # noqa
  2.  
  3. DEBUG = True
  4.  
  5. INTERNAL_IPS = ["127.0.0.1"]
  6.  
  7. SECRET_KEY = "secret"
  8.  
  9. # DATABASE SETTINGS
  10. # https://docs.djangoproject.com/en/1.10/ref/settings/#databases
  11. DATABASES = {
  12.     'default': {
  13.         'ENGINE': 'django.db.backends.sqlite3',
  14.         'NAME': 'development.sqlite3',
  15.         'USER': '',
  16.         'PASSWORD': '',
  17.         'HOST': '',
  18.         'PORT': '',
  19.     },
  20. }
  21.  
  22. CACHES = {
  23.     "default": {
  24.         "BACKEND": "django.core.cache.backends.dummy.DummyCache"
  25.     }
  26. }
  27.  
  28. EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
  29.  
  30.  
  31. # DJANGO DEBUG TOOLBAR SETTINGS
  32. # https://django-debug-toolbar.readthedocs.org
  33. def show_toolbar(request):
  34.     return not request.is_ajax() and request.user and request.user.is_superuser
  35.  
  36. MIDDLEWARE += ["debug_toolbar.middleware.DebugToolbarMiddleware", ]
  37. INSTALLED_APPS += ["debug_toolbar", ]
  38.  
  39. DEBUG_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.  
  48. DEBUG_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.  
  63. try:
  64.     from local_settings import * # noqa
  65. except ImportError:
  66.     pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement