1 # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
6 from sentry_sdk.integrations.django import DjangoIntegration
7 from .defaults import *
8 from ..localsettings import *
10 PROJECT_ROOT = os.path.realpath(os.path.dirname(os.path.dirname(__file__)))
13 PROJECT_ROOT + '/static/'
18 'BACKEND': 'django.template.backends.django.DjangoTemplates',
21 PROJECT_ROOT + '/templates',
24 'context_processors': [
25 "django.contrib.auth.context_processors.auth",
26 "django.template.context_processors.debug",
27 "django.template.context_processors.i18n",
28 "redakcja.context_processors.settings", # this is instead of media
29 'django.template.context_processors.csrf',
30 "django.template.context_processors.request",
31 "django.contrib.messages.context_processors.messages",
38 'django.middleware.common.CommonMiddleware',
39 'django.middleware.csrf.CsrfViewMiddleware',
40 'django.contrib.sessions.middleware.SessionMiddleware',
41 'django.contrib.messages.middleware.MessageMiddleware',
43 'django.contrib.auth.middleware.AuthenticationMiddleware',
44 'django_cas_ng.middleware.CASMiddleware',
46 'django.contrib.admindocs.middleware.XViewMiddleware',
47 'fnp_django_pagination.middleware.PaginationMiddleware',
48 'maintenancemode.middleware.MaintenanceModeMiddleware',
53 'debug_toolbar.middleware.DebugToolbarMiddleware',
56 AUTHENTICATION_BACKENDS = (
57 'django.contrib.auth.backends.ModelBackend',
58 'django_cas_ng.backends.CASBackend',
61 ROOT_URLCONF = 'redakcja.urls'
64 'django.contrib.auth',
65 'django.contrib.contenttypes',
66 'django.contrib.sessions',
67 'django.contrib.messages',
68 'django.contrib.staticfiles',
69 'django.contrib.sites',
70 'django.contrib.admin',
71 'django.contrib.admindocs',
74 'fnp_django_pagination',
92 INSTALLED_APPS += ('debug_toolbar',)
94 LOGIN_REDIRECT_URL = '/documents/user'
96 MIN_COVER_SIZE = (915, 1270)
98 STATICFILES_FINDERS = (
99 'django.contrib.staticfiles.finders.FileSystemFinder',
100 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
101 'pipeline.finders.PipelineFinder',
104 STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
107 'CSS_COMPRESSOR': None,
108 'JS_COMPRESSOR': None,
110 # CSS and JS files to compress
113 'source_filenames': (
120 'css/jquery.autocomplete.css',
121 'css/imgareaselect-default.css',
124 'output_filename': 'compressed/detail_styles.css',
127 'source_filenames': (
130 'output_filename': 'compressed/catalogue_styles.css',
133 'source_filenames': (
136 'output_filename': 'compressed/book.css',
139 'source_filenames': (
140 'contextmenu/jquery.contextMenu.css',
143 'output_filename': 'compressed/book_list.css',
147 # everything except codemirror
149 'source_filenames': (
151 'js/lib/jquery/jquery.autocomplete.js',
152 'js/lib/jquery/jquery.blockui.js',
153 'js/lib/jquery/jquery.elastic.js',
154 'js/lib/jquery/jquery.xmlns.js',
155 'js/button_scripts.js',
159 'js/wiki/wikiapi.js',
164 'js/wiki/toolbar.js',
167 'js/wiki/dialog_save.js',
168 'js/wiki/dialog_revert.js',
169 'js/wiki/dialog_pubmark.js',
172 'js/wiki/view_history.js',
173 'js/wiki/view_summary.js',
174 'js/wiki/view_editor_source.js',
175 'js/wiki/view_editor_wysiwyg.js',
176 'js/wiki/view_gallery.js',
177 'js/wiki/view_annotations.js',
178 'js/wiki/view_search.js',
179 'js/wiki/view_column_diff.js',
181 'output_filename': 'compressed/detail_scripts.js',
184 'source_filenames': (
186 'js/lib/jquery-1.4.2.min.js',
187 'js/lib/jquery/jquery.autocomplete.js',
188 'js/lib/jquery/jquery.blockui.js',
189 'js/lib/jquery/jquery.elastic.js',
190 'js/lib/jquery/jquery.imgareaselect.js',
191 'js/button_scripts.js',
195 'js/wiki_img/wikiapi.js',
198 'js/wiki_img/base.js',
199 'js/wiki/toolbar.js',
202 'js/wiki/dialog_save.js',
203 'js/wiki/dialog_revert.js',
204 'js/wiki/dialog_pubmark.js',
207 'js/wiki_img/view_editor_objects.js',
208 'js/wiki_img/view_editor_motifs.js',
209 'js/wiki/view_editor_source.js',
210 'js/wiki/view_history.js',
211 'js/wiki/view_column_diff.js',
213 'output_filename': 'compressed/detail_img_scripts.js',
216 'source_filenames': (
217 'js/catalogue/catalogue.js',
219 'email_mangler/email_mangler.js',
221 'output_filename': 'compressed/catalogue_scripts.js',
224 'source_filenames': (
225 'js/book_text/jquery.eventdelegation.js',
226 'js/book_text/jquery.scrollto.js',
227 'js/book_text/jquery.highlightfade.js',
228 'js/book_text/book.js',
230 'output_filename': 'compressed/book.js',
233 'source_filenames': (
234 'contextmenu/jquery.ui.position.js',
235 'contextmenu/jquery.contextMenu.js',
236 'js/catalogue/book_list.js',
238 'output_filename': 'compressed/book_list.js',
251 integrations=[DjangoIntegration()]