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',
93 INSTALLED_APPS += ('debug_toolbar',)
95 LOGIN_REDIRECT_URL = '/documents/user'
97 MIN_COVER_SIZE = (915, 1270)
99 STATICFILES_FINDERS = (
100 'django.contrib.staticfiles.finders.FileSystemFinder',
101 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
102 'pipeline.finders.PipelineFinder',
105 STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
108 'CSS_COMPRESSOR': None,
109 'JS_COMPRESSOR': None,
111 # CSS and JS files to compress
114 'source_filenames': (
121 'css/jquery.autocomplete.css',
122 'css/imgareaselect-default.css',
125 'output_filename': 'compressed/detail_styles.css',
128 'source_filenames': (
131 'output_filename': 'compressed/catalogue_styles.css',
134 'source_filenames': (
137 'output_filename': 'compressed/book.css',
140 'source_filenames': (
141 'contextmenu/jquery.contextMenu.css',
144 'output_filename': 'compressed/book_list.css',
148 # everything except codemirror
150 'source_filenames': (
152 'js/lib/jquery/jquery.autocomplete.js',
153 'js/lib/jquery/jquery.blockui.js',
154 'js/lib/jquery/jquery.elastic.js',
155 'js/lib/jquery/jquery.xmlns.js',
156 'js/button_scripts.js',
160 'js/wiki/wikiapi.js',
165 'js/wiki/toolbar.js',
168 'js/wiki/dialog_save.js',
169 'js/wiki/dialog_revert.js',
170 'js/wiki/dialog_pubmark.js',
173 'js/wiki/view_history.js',
174 'js/wiki/view_summary.js',
175 'js/wiki/view_editor_source.js',
176 'js/wiki/view_editor_wysiwyg.js',
177 'js/wiki/view_gallery.js',
178 'js/wiki/view_annotations.js',
179 'js/wiki/view_search.js',
180 'js/wiki/view_column_diff.js',
182 'output_filename': 'compressed/detail_scripts.js',
185 'source_filenames': (
187 'js/lib/jquery-1.4.2.min.js',
188 'js/lib/jquery/jquery.autocomplete.js',
189 'js/lib/jquery/jquery.blockui.js',
190 'js/lib/jquery/jquery.elastic.js',
191 'js/lib/jquery/jquery.imgareaselect.js',
192 'js/button_scripts.js',
196 'js/wiki_img/wikiapi.js',
199 'js/wiki_img/base.js',
200 'js/wiki/toolbar.js',
203 'js/wiki/dialog_save.js',
204 'js/wiki/dialog_revert.js',
205 'js/wiki/dialog_pubmark.js',
208 'js/wiki_img/view_editor_objects.js',
209 'js/wiki_img/view_editor_motifs.js',
210 'js/wiki/view_editor_source.js',
211 'js/wiki/view_history.js',
212 'js/wiki/view_column_diff.js',
214 'output_filename': 'compressed/detail_img_scripts.js',
217 'source_filenames': (
218 'js/catalogue/catalogue.js',
220 'email_mangler/email_mangler.js',
222 'output_filename': 'compressed/catalogue_scripts.js',
225 'source_filenames': (
226 'js/book_text/jquery.eventdelegation.js',
227 'js/book_text/jquery.scrollto.js',
228 'js/book_text/jquery.highlightfade.js',
229 'js/book_text/book.js',
231 'output_filename': 'compressed/book.js',
234 'source_filenames': (
235 'contextmenu/jquery.ui.position.js',
236 'contextmenu/jquery.contextMenu.js',
237 'js/catalogue/book_list.js',
239 'output_filename': 'compressed/book_list.js',
252 integrations=[DjangoIntegration()]