46e61bd851adb9c047c23f15df1cf2344a1e41cb
[wolnelektury.git] / wolnelektury / settings / __init__.py
1 # -*- coding: utf-8 -*-
2 # Django settings for wolnelektury project.
3 from os import path
4
5 from settings.basic import *
6 from settings.auth import *
7 from settings.cache import *
8 from settings.celery import *
9 from settings.contrib import *
10 from settings.custom import *
11 from settings.locale import *
12 from settings.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     "allauth.context_processors.allauth",
24     "allauth.account.context_processors.account",
25 )
26
27 MIDDLEWARE_CLASSES = [
28     'django.middleware.cache.UpdateCacheMiddleware',
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     'piwik.django.middleware.PiwikMiddleware',
37     'maintenancemode.middleware.MaintenanceModeMiddleware',
38     'django.middleware.common.CommonMiddleware',
39     'django.middleware.cache.FetchFromCacheMiddleware',
40     'django.contrib.messages.middleware.MessageMiddleware',
41     'realip_middleware.SetRemoteAddrFromXRealIP',
42 ]
43
44 ROOT_URLCONF = 'wolnelektury.urls'
45
46 # These are the ones we should test.
47 INSTALLED_APPS_OUR = [
48     'wolnelektury_core',
49     # our
50     'ajaxable',
51     'api',
52     'catalogue',
53     'chunks',
54     'dictionary',
55     'infopages',
56     'lesmianator',
57     'newtagging',
58     'opds',
59     'pdcounter',
60     'reporting',
61     'sponsors',
62     'stats',
63     'suggest',
64     'picture',
65     'social',
66     'waiter',
67     'search',
68     'oai',
69     ]
70
71 INSTALLED_APPS_CONTRIB = [
72     # external
73     'django.contrib.auth',
74     'django.contrib.contenttypes',
75     'django.contrib.sessions',
76     'django.contrib.sites',
77     'django.contrib.admin',
78     'django.contrib.admindocs',
79     'django.contrib.staticfiles',
80     'pagination',
81     'pipeline',
82     'piston',
83     'piwik.django',
84     #'rosetta',
85     'south',
86     'sorl.thumbnail',
87     'djcelery',
88     'djkombu',
89     'honeypot',
90     #'django_nose',
91
92     #allauth stuff
93     'emailconfirmation',
94     'uni_form',
95     'allauth',
96     'allauth.account',
97     'allauth.socialaccount',
98     'allauth.openid',
99     #'allauth.facebook',
100     #'allauth.twitter',
101
102     # included
103     'modeltranslation',
104     ]
105
106 INSTALLED_APPS = INSTALLED_APPS_OUR + INSTALLED_APPS_CONTRIB
107
108 # Load localsettings, if they exist
109 try:
110     from localsettings import *
111 except ImportError:
112     pass
113