diff options
author | Theo Chatzimichos <tampakrap@gmail.com> | 2013-08-11 03:45:18 -0700 |
---|---|---|
committer | Theo Chatzimichos <tampakrap@gmail.com> | 2013-08-11 03:45:18 -0700 |
commit | df0de050a347b855174c65f2f7e8972ded2031de (patch) | |
tree | 006861e7426c4d0ce42c996b28b9173bd9a02611 /okupy/settings | |
parent | Merge pull request #51 from tampakrap/remove_modelbackend (diff) | |
parent | sync tests/settings with settings/ (diff) | |
download | identity.gentoo.org-df0de050a347b855174c65f2f7e8972ded2031de.tar.gz identity.gentoo.org-df0de050a347b855174c65f2f7e8972ded2031de.tar.bz2 identity.gentoo.org-df0de050a347b855174c65f2f7e8972ded2031de.zip |
Merge pull request #53 from tampakrap/settings
Settings
Diffstat (limited to 'okupy/settings')
-rw-r--r-- | okupy/settings/__init__.py | 94 |
1 files changed, 47 insertions, 47 deletions
diff --git a/okupy/settings/__init__.py b/okupy/settings/__init__.py index 232a12e..caa426e 100644 --- a/okupy/settings/__init__.py +++ b/okupy/settings/__init__.py @@ -8,6 +8,53 @@ import os # Full path of the project dir PROJECT_ROOT = os.path.dirname(os.path.realpath(__file__)) + '/../..' +SITE_ID = 1 + +ROOT_URLCONF = 'okupy.urls' + +# Python dotted path to the WSGI application used by Django's runserver. +WSGI_APPLICATION = 'okupy.wsgi.application' + +LOGIN_URL = '/login/' +LOGIN_REDIRECT_URL = '/' +LOGOUT_URL = '/logout/' +SESSION_COOKIE_AGE = 900 + +# Custom authentication backend +AUTHENTICATION_BACKENDS = ( + 'django_auth_ldap.backend.LDAPBackend', + 'okupy.common.auth.ExternalBackend', +) + +MIDDLEWARE_CLASSES = ( + 'django.middleware.common.CommonMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django_otp.middleware.OTPMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + # Uncomment the next line for simple clickjacking protection: + # 'django.middleware.clickjacking.XFrameOptionsMiddleware', +) + +INSTALLED_APPS = ( + 'compressor', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.sites', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'okupy.accounts', + 'okupy.otp', + 'okupy.otp.sotp', + 'okupy.otp.totp', +) + +#Compressor settings +COMPRESS_ENABLED = True +COMPRESS_PARSER = 'compressor.parser.HtmlParser' + try: from .local import * except ImportError: @@ -23,13 +70,6 @@ else: MANAGERS = ADMINS -SITE_ID = 1 - -ROOT_URLCONF = 'okupy.urls' - -# Python dotted path to the WSGI application used by Django's runserver. -WSGI_APPLICATION = 'okupy.wsgi.application' - # A sample logging configuration. The only tangible logging # performed by this configuration is to send an email to # the site admins on every HTTP 500 error when DEBUG=False. @@ -102,19 +142,8 @@ LOGGING = { } } -LOGIN_URL = '/login/' -LOGIN_REDIRECT_URL = '/' -LOGOUT_URL = '/logout/' -SESSION_COOKIE_AGE = 900 - AUTH_LDAP_USER_DN_TEMPLATE = AUTH_LDAP_USER_ATTR + '=%(user)s,' + AUTH_LDAP_USER_BASE_DN -# Custom authentication backend -AUTHENTICATION_BACKENDS = ( - 'django_auth_ldap.backend.LDAPBackend', - 'okupy.common.auth.ExternalBackend', -) - # email sending variables regarding server authentication # and configuration should be specified in settings/local.py EMAIL_SUBJECT_PREFIX = '[%s]: ' % INSTANCE_NAME @@ -134,32 +163,3 @@ DATABASES['ldap'] = { } DATABASE_ROUTERS = ['ldapdb.router.Router'] - -MIDDLEWARE_CLASSES = ( - 'django.middleware.common.CommonMiddleware', - 'django.contrib.sessions.middleware.SessionMiddleware', - 'django.middleware.csrf.CsrfViewMiddleware', - 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django_otp.middleware.OTPMiddleware', - 'django.contrib.messages.middleware.MessageMiddleware', - # Uncomment the next line for simple clickjacking protection: - # 'django.middleware.clickjacking.XFrameOptionsMiddleware', -) - -INSTALLED_APPS = ( - 'compressor', - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - 'django.contrib.sites', - 'django.contrib.messages', - 'django.contrib.staticfiles', - 'okupy.accounts', - 'okupy.otp', - 'okupy.otp.sotp', - 'okupy.otp.totp', -) - -#Compressor settings -COMPRESS_ENABLED = True -COMPRESS_PARSER = 'compressor.parser.HtmlParser' |