local.py 3.44 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
# Copyright 2014 Budapest University of Technology and Economics (BME IK)
#
# This file is part of CIRCLE Cloud.
#
# CIRCLE is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option)
# any later version.
#
# CIRCLE is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along
# with CIRCLE.  If not, see <http://www.gnu.org/licenses/>.

18
"""Development settings and globals."""
Bach Dániel committed
19
# flake8: noqa
20 21


Őry Máté committed
22
from base import *  # noqa
23 24 25 26 27 28 29 30 31 32


########## 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

33
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTOCOL', 'https')
34 35 36 37 38 39 40 41 42 43 44 45

########## 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',
Bach Dániel committed
46
#         'NAME': normpath(join(BASE_DIR, 'default.db')),
47 48 49 50 51 52 53 54 55 56 57 58 59
#         'USER': '',
#         'PASSWORD': '',
#         'HOST': '',
#         'PORT': '',
#     }
# }
########## END DATABASE CONFIGURATION


########## CACHE CONFIGURATION
# See: https://docs.djangoproject.com/en/dev/ref/settings/#caches
CACHES = {
    'default': {
60 61
        'BACKEND': 'django.core.cache.backends.memcached.PyLibMCCache',
        'LOCATION': '127.0.0.1:11211',
62 63 64 65 66
    }
}
########## END CACHE CONFIGURATION


Bach Dániel committed
67 68 69 70 71 72 73
########## ROSETTA CONFIGURATION
INSTALLED_APPS += (
    'rosetta',
)
########## END ROSETTA CONFIGURATION


74
########## TOOLBAR CONFIGURATION
Kálmán Viktor committed
75
# https://github.com/django-debug-toolbar/django-debug-toolbar#installation
76 77
if get_env_variable('DJANGO_TOOLBAR', 'FALSE') == 'TRUE':
    INSTALLED_APPS += (
Kálmán Viktor committed
78
        'debug_toolbar',
79 80
    )

Kálmán Viktor committed
81 82 83 84
    # https://github.com/django-debug-toolbar/django-debug-toolbar#installation
    INTERNAL_IPS = (
        get_env_variable('SSH_CLIENT', '127.0.0.1').split(' ')[0],
    )
85

Kálmán Viktor committed
86
    # https://github.com/django-debug-toolbar/django-debug-toolbar#installation
87
    MIDDLEWARE_CLASSES += (
Kálmán Viktor committed
88
        'debug_toolbar.middleware.DebugToolbarMiddleware',
89 90
    )

Kálmán Viktor committed
91
    # https://github.com/django-debug-toolbar/django-debug-toolbar#installation
92
    DEBUG_TOOLBAR_CONFIG = {
Kálmán Viktor committed
93 94
        'INTERCEPT_REDIRECTS': False,
        'SHOW_TEMPLATE_CONTEXT': True,
95 96
    }
    ########## END TOOLBAR CONFIGURATION
97

98 99
LOGGING['loggers']['djangosaml2'] = {'handlers': ['console'], 'level': 'DEBUG'}

100 101 102 103 104
LOGGING['handlers']['console'] = {'level': 'DEBUG',
                                  'class': 'logging.StreamHandler',
                                  'formatter': 'simple'}
for i in LOCAL_APPS:
    LOGGING['loggers'][i] = {'handlers': ['console'], 'level': 'DEBUG'}
105 106

CRISPY_FAIL_SILENTLY = not DEBUG
107 108 109 110 111

# propagate exceptions from signals
if DEBUG:
    from django.dispatch import Signal
    Signal.send_robust = Signal.send
112

113 114
PIPELINE_COMPILERS = (
    'dashboard.compilers.DummyLessCompiler',
115
)
116 117

ADMIN_ENABLED = True