7c3787c83524eb5e18834d525fe5e7c4b3a94a5b
[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.common.CommonMiddleware',
30     'django.contrib.sessions.middleware.SessionMiddleware',
31     'django.middleware.csrf.CsrfViewMiddleware',
32     'django.contrib.auth.middleware.AuthenticationMiddleware',
33     'django.middleware.doc.XViewMiddleware',
34     'pagination.middleware.PaginationMiddleware',
35     'django.middleware.locale.LocaleMiddleware',
36     'maintenancemode.middleware.MaintenanceModeMiddleware',
37     'django.middleware.common.CommonMiddleware',
38     'django.contrib.messages.middleware.MessageMiddleware',
39     'fnpdjango.middleware.SetRemoteAddrFromXRealIP',
40 ]
41
42 ROOT_URLCONF = 'wolnelektury.urls'
43
44 # These are the ones we should test.
45 INSTALLED_APPS_OUR = [
46     'wolnelektury_core',
47     # our
48     'ajaxable',
49     'api',
50     'catalogue',
51     'chunks',
52     'dictionary',
53     'infopages',
54     'lesmianator',
55     'newtagging',
56     'opds',
57     'pdcounter',
58     'reporting',
59     'sponsors',
60     'stats',
61     'suggest',
62     'picture',
63     'social',
64     'waiter',
65     'search',
66     'oai',
67     'funding',
68     'polls',
69     'libraries',
70     ]
71
72 GETPAID_BACKENDS = (
73     'getpaid.backends.payu',
74 )
75
76 INSTALLED_APPS_CONTRIB = [
77     # Should be before django.contrib.admin
78     'modeltranslation',
79
80     # external
81     'django.contrib.auth',
82     'django.contrib.contenttypes',
83     'django.contrib.sessions',
84     'django.contrib.sites',
85     'django.contrib.admin',
86     'django.contrib.admindocs',
87     'django.contrib.staticfiles',
88     'pagination',
89     'pipeline',
90     'piston',
91     'piwik',
92     #'rosetta',
93     #'south',
94     'sorl.thumbnail',
95     'djcelery',
96     'kombu.transport.django',
97     'honeypot',
98     #'django_nose',
99     'fnpdjango',
100     'getpaid',
101     'getpaid.backends.payu',
102
103     #allauth stuff
104     'uni_form',
105     'allauth',
106     'allauth.account',
107     'allauth.socialaccount',
108     'allauth.socialaccount.providers.openid',
109     'allauth.socialaccount.providers.facebook',
110     #'allauth.socialaccount.providers.twitter',
111     ]
112
113 INSTALLED_APPS = INSTALLED_APPS_OUR + INSTALLED_APPS_CONTRIB
114
115 # Load localsettings, if they exist
116 try:
117     from wolnelektury.localsettings import *
118 except ImportError:
119     pass