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 DATA_UPLOAD_MAX_MEMORY_SIZE = 20000000
12 PROJECT_ROOT = os.path.realpath(os.path.dirname(os.path.dirname(__file__)))
15 PROJECT_ROOT + '/static/'
20 'BACKEND': 'django.template.backends.django.DjangoTemplates',
23 PROJECT_ROOT + '/templates',
26 'context_processors': [
27 "django.contrib.auth.context_processors.auth",
28 "django.template.context_processors.debug",
29 "django.template.context_processors.i18n",
30 "redakcja.context_processors.settings", # this is instead of media
31 'django.template.context_processors.csrf',
32 "django.template.context_processors.request",
33 "django.contrib.messages.context_processors.messages",
40 'django.middleware.common.CommonMiddleware',
41 'django.middleware.csrf.CsrfViewMiddleware',
42 'django.contrib.sessions.middleware.SessionMiddleware',
43 'django.contrib.messages.middleware.MessageMiddleware',
45 'django.contrib.auth.middleware.AuthenticationMiddleware',
46 'django_cas_ng.middleware.CASMiddleware',
48 'django.contrib.admindocs.middleware.XViewMiddleware',
49 'fnp_django_pagination.middleware.PaginationMiddleware',
50 'maintenancemode.middleware.MaintenanceModeMiddleware',
55 'debug_toolbar.middleware.DebugToolbarMiddleware',
58 AUTHENTICATION_BACKENDS = (
59 'django.contrib.auth.backends.ModelBackend',
60 'django_cas_ng.backends.CASBackend',
63 ROOT_URLCONF = 'redakcja.urls'
66 'django.contrib.auth',
67 'django.contrib.contenttypes',
68 'django.contrib.sessions',
69 'django.contrib.messages',
70 'django.contrib.staticfiles',
71 'django.contrib.sites',
72 'django.contrib.admin',
73 'django.contrib.admindocs',
76 'fnp_django_pagination',
95 INSTALLED_APPS += ('debug_toolbar',)
97 LOGIN_REDIRECT_URL = '/documents/user'
99 MIN_COVER_SIZE = (915, 1270)
101 STATICFILES_FINDERS = (
102 'django.contrib.staticfiles.finders.FileSystemFinder',
103 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
104 'pipeline.finders.PipelineFinder',
107 STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
110 'CSS_COMPRESSOR': None,
111 'JS_COMPRESSOR': None,
113 'libsasscompiler.LibSassCompiler',
116 # CSS and JS files to compress
119 'source_filenames': (
126 'css/imgareaselect-default.css',
129 'wiki/scss/splitter.scss',
130 'wiki/scss/visual.scss'
132 'output_filename': 'compressed/detail_styles.css',
135 'source_filenames': (
138 'output_filename': 'compressed/catalogue_styles.css',
141 'source_filenames': (
144 'output_filename': 'compressed/book.css',
147 'source_filenames': (
150 'output_filename': 'compressed/book_list.css',
154 # everything except codemirror
156 'source_filenames': (
158 'js/lib/jquery/jquery.blockui.js',
159 'js/lib/jquery/jquery.elastic.js',
160 'js/lib/jquery/jquery.xmlns.js',
161 'js/button_scripts.js',
165 'js/wiki/wikiapi.js',
171 'wiki/js/sidebar-perspective.js',
172 'js/wiki/toolbar.js',
175 'js/wiki/dialog_save.js',
176 'js/wiki/dialog_revert.js',
177 'js/wiki/dialog_pubmark.js',
180 'js/wiki/view_history.js',
181 'js/wiki/view_summary.js',
182 'js/wiki/view_editor_source.js',
183 'js/wiki/view_editor_wysiwyg.js',
184 'js/wiki/view_gallery.js',
185 'js/wiki/view_annotations.js',
186 'js/wiki/view_search.js',
187 'js/wiki/view_column_diff.js',
189 'output_filename': 'compressed/detail_scripts.js',
192 'source_filenames': (
194 'js/lib/jquery/jquery.blockui.js',
195 'js/lib/jquery/jquery.elastic.js',
196 'js/lib/jquery/jquery.imgareaselect.js',
197 'js/button_scripts.js',
201 'js/wiki_img/wikiapi.js',
205 'js/wiki_img/base.js',
206 'js/wiki/toolbar.js',
209 'js/wiki/dialog_save.js',
210 'js/wiki/dialog_revert.js',
211 'js/wiki/dialog_pubmark.js',
214 'js/wiki_img/view_editor_objects.js',
215 'js/wiki_img/view_editor_motifs.js',
216 'js/wiki/view_editor_source.js',
217 'js/wiki/view_history.js',
218 'js/wiki/view_column_diff.js',
220 'output_filename': 'compressed/detail_img_scripts.js',
223 'source_filenames': (
224 'js/catalogue/catalogue.js',
226 'email_mangler/email_mangler.js',
228 'output_filename': 'compressed/catalogue_scripts.js',
231 'source_filenames': (
232 'js/book_text/jquery.eventdelegation.js',
233 'js/book_text/jquery.scrollto.js',
234 'js/book_text/jquery.highlightfade.js',
235 'js/book_text/book.js',
237 'output_filename': 'compressed/book.js',
240 'source_filenames': (
241 'js/catalogue/book_list.js',
243 'output_filename': 'compressed/book_list.js',
249 SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
259 integrations=[DjangoIntegration()]