Minor fix.
[wolnelektury.git] / wolnelektury / settings / __init__.py
1 # -*- coding: utf-8 -*-
2 # Django settings for wolnelektury project.
3 from os import path
4
5 from .basic import *
6 from .auth import *
7 from .cache import *
8 from .celery import *
9 from .contrib import *
10 from .custom import *
11 from .locale import *
12 from .static import *
13
14
15 TEMPLATE_CONTEXT_PROCESSORS = (
16     'django.contrib.auth.context_processors.auth',
17     'django.core.context_processors.debug',
18     'django.core.context_processors.i18n',
19     'django.core.context_processors.media',
20     'django.core.context_processors.request',
21     'wolnelektury_core.context_processors.extra_settings',
22     'search.context_processors.search_form',
23
24     "allauth.account.context_processors.account",
25     "allauth.socialaccount.context_processors.socialaccount",
26 )
27
28 MIDDLEWARE_CLASSES = [
29     'django.middleware.cache.UpdateCacheMiddleware',
30     'django.middleware.common.CommonMiddleware',
31     'django.contrib.sessions.middleware.SessionMiddleware',
32     'django.middleware.csrf.CsrfViewMiddleware',
33     'django.contrib.auth.middleware.AuthenticationMiddleware',
34     'django.middleware.doc.XViewMiddleware',
35     'pagination.middleware.PaginationMiddleware',
36     'django.middleware.locale.LocaleMiddleware',
37     'piwik.django.middleware.PiwikMiddleware',
38     'maintenancemode.middleware.MaintenanceModeMiddleware',
39     'django.middleware.common.CommonMiddleware',
40     'django.middleware.cache.FetchFromCacheMiddleware',
41     'django.contrib.messages.middleware.MessageMiddleware',
42     'fnpdjango.middleware.SetRemoteAddrFromXRealIP',
43 ]
44
45 ROOT_URLCONF = 'wolnelektury.urls'
46
47 # These are the ones we should test.
48 INSTALLED_APPS_OUR = [
49     'wolnelektury_core',
50     # our
51     'ajaxable',
52     'api',
53     'catalogue',
54     'chunks',
55     'dictionary',
56     'infopages',
57     'lesmianator',
58     'newtagging',
59     'opds',
60     'pdcounter',
61     'reporting',
62     'sponsors',
63     'stats',
64     'suggest',
65     'picture',
66     'social',
67     'waiter',
68     'search',
69     'oai',
70     'funding',
71     ]
72
73 GETPAID_BACKENDS = (
74     'getpaid.backends.payu',
75 )
76
77 INSTALLED_APPS_CONTRIB = [
78     # external
79     'django.contrib.auth',
80     'django.contrib.contenttypes',
81     'django.contrib.sessions',
82     'django.contrib.sites',
83     'django.contrib.admin',
84     'django.contrib.admindocs',
85     'django.contrib.staticfiles',
86     'pagination',
87     'pipeline',
88     'piston',
89     'piwik.django',
90     #'rosetta',
91     'south',
92     'sorl.thumbnail',
93     'djcelery',
94     'djkombu',
95     'honeypot',
96     #'django_nose',
97     'fnpdjango',
98     'getpaid',
99     'getpaid.backends.payu',
100
101     #allauth stuff
102     'uni_form',
103     'allauth',
104     'allauth.account',
105     'allauth.socialaccount',
106     'allauth.socialaccount.providers.openid',
107     'allauth.socialaccount.providers.facebook',
108     #'allauth.socialaccount.providers.twitter',
109
110     # included
111     'modeltranslation',
112     ]
113
114 INSTALLED_APPS = INSTALLED_APPS_OUR + INSTALLED_APPS_CONTRIB
115
116 # Load localsettings, if they exist
117 try:
118     from wolnelektury.localsettings import *
119 except ImportError:
120     pass