diff --git a/www/conservancy/settings.py b/www/conservancy/settings.py index 3da89373..44360548 100644 --- a/www/conservancy/settings.py +++ b/www/conservancy/settings.py @@ -17,6 +17,8 @@ # along with this program in a file in the toplevel directory called # "AGPLv3". If not, see . +from pathlib import Path + from djangocommonsettings import * SITE_ID = 2 @@ -104,24 +106,24 @@ DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' BASE_DIR = Path(__file__).resolve().parent.parent TEMPLATES = [ - { - 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [ - BASE_DIR / 'conservancy' / 'templates', - BASE_DIR / 'conservancy' / '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', - ] - } - } + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [ + BASE_DIR / 'conservancy' / 'templates', + BASE_DIR / 'conservancy' / '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', + ] + } + } ] STATIC_ROOT = BASE_DIR.parent / 'collected_static' @@ -130,10 +132,10 @@ STATICFILES_DIRS = [ ] 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', + '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', ] diff --git a/www/conservancy/urls.py b/www/conservancy/urls.py index 1c44ba72..94699982 100644 --- a/www/conservancy/urls.py +++ b/www/conservancy/urls.py @@ -49,14 +49,12 @@ urlpatterns = [ url(r'^about', static_views.index), url(r'^activities', static_views.index), url(r'^donate', static_views.index), - url(r'^copyleft-compliance', static_views.index, - {'fundraiser_sought' : 'vmware-match-0'}), + url(r'^copyleft-compliance', static_views.index, {'fundraiser_sought': 'vmware-match-0'}), url(r'^learn', static_views.index), url(r'^press', static_views.index), url(r'^projects', static_views.index), url(r'^GiveUpGitHub', static_views.index), - url(r'^npoacct', static_views.index, - {'fundraiser_sought' : 'npoacct'}), + url(r'^npoacct', static_views.index, {'fundraiser_sought': 'npoacct'}), url(r'^contractpatch', include('conservancy.apps.contractpatch.urls')), url(r'^overview', static_views.index), url(r'^privacy-policy', static_views.index),