diff --git a/www/conservancy/settings.py b/www/conservancy/settings.py index 93167960..57dd68fd 100644 --- a/www/conservancy/settings.py +++ b/www/conservancy/settings.py @@ -100,3 +100,39 @@ INSTALLED_APPS = [ ] DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' + +_conservancy_root_dir = Path(__file__).resolve().parent / 'conservancy' +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [ + _conservancy_root_dir / 'templates', + _conservancy_root_dir / 'static', + ], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + 'conservancy.local_context_processors.host_url', + 'conservancy.local_context_processors.sitefundraiser', + ] + } + } +] + +AUTHENTICATION_BACKENDS = ( +# 'conservancy.auth.LDAPBackend', +'django.contrib.auth.backends.ModelBackend', +) + +MIDDLEWARE = [ + 'django.middleware.common.CommonMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'conservancy.middleware.ForceCanonicalHostnameMiddleware', + # 'django.middleware.doc.XViewMiddleware', +]