Move TEMPLATES, AUTHENTICATION_BACKENDS and MIDDLEWARE into base settings
These don't change, so belong in the base settings.
This commit is contained in:
parent
fb9e7242b5
commit
6b95646cc7
1 changed files with 36 additions and 0 deletions
|
@ -100,3 +100,39 @@ INSTALLED_APPS = [
|
||||||
]
|
]
|
||||||
|
|
||||||
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
|
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',
|
||||||
|
]
|
||||||
|
|
Loading…
Reference in a new issue