Use secure transport for requirements.
[wolnelektury.git] / wolnelektury / settings / __init__.py
index 2005797..4f61940 100644 (file)
@@ -2,14 +2,14 @@
 # Django settings for wolnelektury project.
 from os import path
 
-from settings.basic import *
-from settings.auth import *
-from settings.cache import *
-from settings.celery import *
-from settings.contrib import *
-from settings.custom import *
-from settings.locale import *
-from settings.static import *
+from .basic import *
+from .auth import *
+from .cache import *
+from .celery import *
+from .contrib import *
+from .custom import *
+from .locale import *
+from .static import *
 
 
 TEMPLATE_CONTEXT_PROCESSORS = (
@@ -20,62 +20,34 @@ TEMPLATE_CONTEXT_PROCESSORS = (
     'django.core.context_processors.request',
     'wolnelektury_core.context_processors.extra_settings',
     'search.context_processors.search_form',
-    "allauth.context_processors.allauth",
+
     "allauth.account.context_processors.account",
+    "allauth.socialaccount.context_processors.socialaccount",
 )
 
 MIDDLEWARE_CLASSES = [
+    'django.middleware.csrf.CsrfViewMiddleware',
+    'ssify.middleware.SsiMiddleware',
     'django.middleware.cache.UpdateCacheMiddleware',
+    'ssify.middleware.PrepareForCacheMiddleware',
     'django.middleware.common.CommonMiddleware',
     'django.contrib.sessions.middleware.SessionMiddleware',
-    'django.middleware.csrf.CsrfViewMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
-    'django.middleware.doc.XViewMiddleware',
+    'django.contrib.admindocs.middleware.XViewMiddleware',
     'pagination.middleware.PaginationMiddleware',
-    'django.middleware.locale.LocaleMiddleware',
-    'piwik.django.middleware.PiwikMiddleware',
+    'ssify.middleware.LocaleMiddleware',
     'maintenancemode.middleware.MaintenanceModeMiddleware',
     'django.middleware.common.CommonMiddleware',
-    'django.middleware.cache.FetchFromCacheMiddleware',
     'django.contrib.messages.middleware.MessageMiddleware',
+    'fnpdjango.middleware.SetRemoteAddrFromXRealIP',
+    'django.middleware.cache.FetchFromCacheMiddleware',
 ]
 
 ROOT_URLCONF = 'wolnelektury.urls'
 
-INSTALLED_APPS = [
+# These are the ones we should test.
+INSTALLED_APPS_OUR = [
     'wolnelektury_core',
-    # external
-    'django.contrib.auth',
-    'django.contrib.contenttypes',
-    'django.contrib.sessions',
-    'django.contrib.sites',
-    'django.contrib.admin',
-    'django.contrib.admindocs',
-    'pagination',
-    'piston',
-    'piwik.django',
-    #'rosetta',
-    'south',
-    'sorl.thumbnail',
-    'djcelery',
-    'djkombu',
-    'honeypot',
-    #    'django_nose',
-
-    #allauth stuff
-    'emailconfirmation',
-    'uni_form',
-    'allauth',
-    'allauth.account',
-    'allauth.socialaccount',
-    'allauth.openid',
-    #'allauth.facebook',
-    #'allauth.twitter',
-
-    # included
-    'compress',
-    'modeltranslation',
-
     # our
     'ajaxable',
     'api',
@@ -84,7 +56,6 @@ INSTALLED_APPS = [
     'dictionary',
     'infopages',
     'lesmianator',
-    #'lessons',
     'newtagging',
     'opds',
     'pdcounter',
@@ -93,14 +64,57 @@ INSTALLED_APPS = [
     'stats',
     'suggest',
     'picture',
-    'search',
     'social',
     'waiter',
-]
+    'search',
+    'oai',
+    'funding',
+    'polls',
+    'libraries',
+    ]
+
+GETPAID_BACKENDS = (
+    'getpaid.backends.payu',
+)
+
+INSTALLED_APPS_CONTRIB = [
+    # Should be before django.contrib.admin
+    'modeltranslation',
+
+    # external
+    'django.contrib.auth',
+    'django.contrib.contenttypes',
+    'django.contrib.sessions',
+    'django.contrib.sites',
+    'django.contrib.admin',
+    'django.contrib.admindocs',
+    'django.contrib.staticfiles',
+    'pagination',
+    'pipeline',
+    'piston',
+    'piwik',
+    'sorl.thumbnail',
+    'kombu.transport.django',
+    'honeypot',
+    'fnpdjango',
+    'getpaid',
+    'getpaid.backends.payu',
+    'ssify',
+
+    #allauth stuff
+    'uni_form',
+    'allauth',
+    'allauth.account',
+    'allauth.socialaccount',
+    'allauth.socialaccount.providers.openid',
+    'allauth.socialaccount.providers.facebook',
+    #'allauth.socialaccount.providers.twitter',
+    ]
+
+INSTALLED_APPS = INSTALLED_APPS_OUR + INSTALLED_APPS_CONTRIB
 
 # Load localsettings, if they exist
 try:
-    from localsettings import *
+    from wolnelektury.localsettings import *
 except ImportError:
     pass
-