local.py 2.29 KB
Newer Older
1 2 3
"""Development settings and globals."""


Őry Máté committed
4
from base import *  # noqa
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47


########## DEBUG CONFIGURATION
# See: https://docs.djangoproject.com/en/dev/ref/settings/#debug
DEBUG = True

# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-debug
TEMPLATE_DEBUG = DEBUG
########## END DEBUG CONFIGURATION


########## EMAIL CONFIGURATION
# See: https://docs.djangoproject.com/en/dev/ref/settings/#email-backend
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
########## END EMAIL CONFIGURATION


########## DATABASE CONFIGURATION
# See: https://docs.djangoproject.com/en/dev/ref/settings/#databases
# DATABASES = {
#     'default': {
#         'ENGINE': 'django.db.backends.sqlite3',
#         'NAME': normpath(join(DJANGO_ROOT, 'default.db')),
#         'USER': '',
#         'PASSWORD': '',
#         'HOST': '',
#         'PORT': '',
#     }
# }
########## END DATABASE CONFIGURATION


########## CACHE CONFIGURATION
# See: https://docs.djangoproject.com/en/dev/ref/settings/#caches
CACHES = {
    'default': {
        'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
    }
}
########## END CACHE CONFIGURATION


########## TOOLBAR CONFIGURATION
Kálmán Viktor committed
48
# https://github.com/django-debug-toolbar/django-debug-toolbar#installation
49 50
if get_env_variable('DJANGO_TOOLBAR', 'FALSE') == 'TRUE':
    INSTALLED_APPS += (
Kálmán Viktor committed
51
        'debug_toolbar',
52 53
    )

Kálmán Viktor committed
54 55 56 57
    # https://github.com/django-debug-toolbar/django-debug-toolbar#installation
    INTERNAL_IPS = (
        get_env_variable('SSH_CLIENT', '127.0.0.1').split(' ')[0],
    )
58

Kálmán Viktor committed
59
    # https://github.com/django-debug-toolbar/django-debug-toolbar#installation
60
    MIDDLEWARE_CLASSES += (
Kálmán Viktor committed
61
        'debug_toolbar.middleware.DebugToolbarMiddleware',
62 63
    )

Kálmán Viktor committed
64
    # https://github.com/django-debug-toolbar/django-debug-toolbar#installation
65
    DEBUG_TOOLBAR_CONFIG = {
Kálmán Viktor committed
66 67
        'INTERCEPT_REDIRECTS': False,
        'SHOW_TEMPLATE_CONTEXT': True,
68 69
    }
    ########## END TOOLBAR CONFIGURATION
70

71 72
LOGGING['loggers']['djangosaml2'] = {'handlers': ['console'], 'level': 'DEBUG'}

73 74 75 76 77
LOGGING['handlers']['console'] = {'level': 'DEBUG',
                                  'class': 'logging.StreamHandler',
                                  'formatter': 'simple'}
for i in LOCAL_APPS:
    LOGGING['loggers'][i] = {'handlers': ['console'], 'level': 'DEBUG'}
78 79

CRISPY_FAIL_SILENTLY = not DEBUG