aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Chatzimichos <tampakrap@gentoo.org>2013-08-11 12:19:11 +0200
committerTheo Chatzimichos <tampakrap@gentoo.org>2013-08-11 12:19:11 +0200
commit7e1516054dc1f260d2c010215fb871f80b83e734 (patch)
tree3cbe29f0ed1c028d33e4657e830104c08bf4002e /okupy/settings
parentMerge pull request #51 from tampakrap/remove_modelbackend (diff)
downloadidentity.gentoo.org-7e1516054dc1f260d2c010215fb871f80b83e734.tar.gz
identity.gentoo.org-7e1516054dc1f260d2c010215fb871f80b83e734.tar.bz2
identity.gentoo.org-7e1516054dc1f260d2c010215fb871f80b83e734.zip
Move settings around, so they can actually be overwritten
Diffstat (limited to 'okupy/settings')
-rw-r--r--okupy/settings/__init__.py94
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'