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',
50 'django_cas_ng.middleware.CASMiddleware',
54 'django.contrib.admindocs.middleware.XViewMiddleware',
55 'fnp_django_pagination.middleware.PaginationMiddleware',
60 'debug_toolbar.middleware.DebugToolbarMiddleware',
64 AUTHENTICATION_BACKENDS = (
65 'django.contrib.auth.backends.ModelBackend',
66 'django_cas_ng.backends.CASBackend',
69 ROOT_URLCONF = 'redakcja.urls'
74 'django.contrib.auth',
75 'django.contrib.contenttypes',
76 'django.contrib.sessions',
77 'django.contrib.messages',
78 'django.contrib.staticfiles',
79 'django.contrib.sites',
80 'admin_numeric_filter',
81 'django.contrib.admin',
82 'django.contrib.admindocs',
85 'fnp_django_pagination',
107 'wlxml.apps.WlxmlConfig',
114 INSTALLED_APPS += ('debug_toolbar',)
117 PROJECT_ROOT + "/locale-contrib",
120 LOGIN_REDIRECT_URL = '/documents/user'
122 MIN_COVER_SIZE = (915, 1270)
124 LEGIMI_SMALL_WORDS = 2000
125 LEGIMI_BIG_WORDS = 10000
126 LEGIMI_SMALL_PRICE = 7
127 LEGIMI_BIG_PRICE = 20
129 THUMBNAIL_PRESERVE_FORMAT = True
131 STATICFILES_FINDERS = (
132 'django.contrib.staticfiles.finders.FileSystemFinder',
133 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
134 'pipeline.finders.PipelineFinder',
137 STATICFILES_STORAGE = 'pipeline.storage.PipelineManifestStorage'
140 'CSS_COMPRESSOR': None,
141 'JS_COMPRESSOR': None,
143 'libsasscompiler.LibSassCompiler',
146 # CSS and JS files to compress
149 'source_filenames': (
156 'css/imgareaselect-default.css',
159 'wiki/scss/splitter.scss',
160 'wiki/scss/visual.scss'
162 'output_filename': 'compressed/detail_styles.css',
165 'source_filenames': (
168 'output_filename': 'compressed/documents_styles.css',
171 'source_filenames': (
174 'output_filename': 'compressed/book.css',
177 'source_filenames': (
180 'output_filename': 'compressed/book_list.css',
184 # everything except codemirror
186 'source_filenames': (
188 'js/lib/jquery/jquery.blockui.js',
189 'js/lib/jquery/jquery.elastic.js',
190 'js/lib/jquery/jquery.xmlns.js',
191 'js/button_scripts.js',
196 'js/wiki/wikiapi.js',
202 'js/wiki/toolbar.js',
207 'js/wiki/dialog_save.js',
208 'js/wiki/dialog_revert.js',
209 'js/wiki/dialog_pubmark.js',
212 'js/wiki/view_sidebar.js',
213 'js/wiki/view_history.js',
214 'js/wiki/view_summary.js',
215 'js/wiki/view_editor_source.js',
216 'js/wiki/view_editor_wysiwyg.js',
217 'js/wiki/view_gallery.js',
218 'js/wiki/view_annotations.js',
219 'js/wiki/view_properties.js',
220 'js/wiki/view_search.js',
221 'js/wiki/view_column_diff.js',
223 'output_filename': 'compressed/detail_scripts.js',
226 'source_filenames': (
228 'js/lib/jquery/jquery.blockui.js',
229 'js/lib/jquery/jquery.elastic.js',
230 'js/lib/jquery/jquery.imgareaselect.js',
231 'js/button_scripts.js',
235 'js/wiki_img/wikiapi.js',
239 'js/wiki_img/base.js',
240 'js/wiki/toolbar.js',
243 'js/wiki/dialog_save.js',
244 'js/wiki/dialog_revert.js',
245 'js/wiki/dialog_pubmark.js',
248 'js/wiki_img/view_editor_objects.js',
249 'js/wiki_img/view_editor_motifs.js',
250 'js/wiki/view_editor_source.js',
251 'js/wiki/view_history.js',
252 'js/wiki/view_column_diff.js',
254 'output_filename': 'compressed/detail_img_scripts.js',
257 'source_filenames': (
258 'js/documents/documents.js',
260 'email_mangler/email_mangler.js',
262 'output_filename': 'compressed/documents_scripts.js',
265 'source_filenames': (
266 'js/lib/jquery/jquery.cycle2.min.js',
267 'js/book_text/jquery.eventdelegation.js',
268 'js/book_text/jquery.scrollto.js',
269 'js/book_text/jquery.highlightfade.js',
270 'js/book_text/book.js',
272 'output_filename': 'compressed/book.js',
275 'source_filenames': (
276 'js/documents/book_list.js',
278 'output_filename': 'compressed/book_list.js',
284 DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
287 SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
291 'DEFAULT_AUTHENTICATION_CLASSES': [
292 'rest_framework.authentication.SessionAuthentication',
293 'redakcja.api.auth.TokenAuthentication',
295 'DEFAULT_FILTER_BACKENDS': [
296 'django_filters.rest_framework.DjangoFilterBackend',
297 'rest_framework.filters.SearchFilter',
309 TEST_INTEGRATION = False
319 integrations=[DjangoIntegration()]