Cite base
[wolnelektury.git] / src / wolnelektury / settings / basic.py
1 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
3 #
4 from os import path
5 from .paths import PROJECT_DIR
6
7 DEBUG = False
8 MAINTENANCE_MODE = False
9
10 ADMINS = [
11     # ('Your Name', 'your_email@domain.com'),
12 ]
13
14 MANAGERS = ADMINS
15
16 DATABASES = {
17     'default': {
18         'ENGINE': 'django.db.backends.sqlite3',  # 'postgresql_psycopg2'
19         'NAME': path.join(PROJECT_DIR, 'dev.db'),
20         'USER': '',                      # Not used with sqlite3.
21         'PASSWORD': '',                  # Not used with sqlite3.
22         'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
23     }
24 }
25
26 SOLR = "http://localhost:8983/solr/wl/"
27 SOLR_TEST = "http://localhost:8983/solr/wl_test/"
28 SOLR_STOPWORDS = "/path/to/solr/data/conf/lang/stopwords_pl.txt"
29
30 # Local time zone for this installation. Choices can be found here:
31 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
32 # although not all choices may be available on all operating systems.
33 # If running in a Windows environment this must be set to the same as your
34 # system time zone.
35 TIME_ZONE = 'Europe/Warsaw'
36 USE_TZ = True
37
38 SITE_ID = 1
39
40 TEMPLATES = [{
41     'BACKEND': 'django.template.backends.django.DjangoTemplates',
42     'OPTIONS': {
43         'loaders': (
44             ('django.template.loaders.cached.Loader', (
45                 'django.template.loaders.filesystem.Loader',
46                 'django.template.loaders.app_directories.Loader',
47             )),
48         ),
49         'context_processors': (
50             'django.contrib.auth.context_processors.auth',
51             'django.template.context_processors.debug',
52             'django.template.context_processors.i18n',
53             'django.template.context_processors.media',
54             'django.template.context_processors.request',
55             'wolnelektury.context_processors.extra_settings',
56             'search.context_processors.search_form',
57         ),
58     },
59 }]
60
61 MIDDLEWARE_CLASSES = [
62     'debug_toolbar.middleware.DebugToolbarMiddleware',
63     'django.middleware.csrf.CsrfViewMiddleware',
64     'ssify.middleware.SsiMiddleware',
65     'django.middleware.cache.UpdateCacheMiddleware',
66     'ssify.middleware.PrepareForCacheMiddleware',
67     'django.middleware.common.CommonMiddleware',
68     'django.contrib.sessions.middleware.SessionMiddleware',
69     'django.contrib.auth.middleware.AuthenticationMiddleware',
70     'django.contrib.admindocs.middleware.XViewMiddleware',
71     'fnp_django_pagination.middleware.PaginationMiddleware',
72     'ssify.middleware.LocaleMiddleware',
73     'maintenancemode.middleware.MaintenanceModeMiddleware',
74     'django.middleware.common.CommonMiddleware',
75     'django.contrib.messages.middleware.MessageMiddleware',
76     'fnpdjango.middleware.SetRemoteAddrFromXRealIP',
77     'django.middleware.cache.FetchFromCacheMiddleware',
78 ]
79
80 ROOT_URLCONF = 'wolnelektury.urls'