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 *
10 from ..localsettings import *
14 DATA_UPLOAD_MAX_MEMORY_SIZE = 20000000
16 PROJECT_ROOT = os.path.realpath(os.path.dirname(os.path.dirname(__file__)))
19 PROJECT_ROOT + '/static/'
24 'BACKEND': 'django.template.backends.django.DjangoTemplates',
27 PROJECT_ROOT + '/templates',
30 'context_processors': [
31 "django.contrib.auth.context_processors.auth",
32 "django.template.context_processors.debug",
33 "django.template.context_processors.i18n",
34 "redakcja.context_processors.settings", # this is instead of media
35 'django.template.context_processors.csrf',
36 "django.template.context_processors.request",
37 "django.contrib.messages.context_processors.messages",
44 'django.middleware.common.CommonMiddleware',
45 'django.middleware.csrf.CsrfViewMiddleware',
46 'django.contrib.sessions.middleware.SessionMiddleware',
47 'django.contrib.messages.middleware.MessageMiddleware',
49 'django.contrib.auth.middleware.AuthenticationMiddleware',
54 'django_cas_ng.middleware.CASMiddleware',
58 'django.contrib.admindocs.middleware.XViewMiddleware',
59 'fnp_django_pagination.middleware.PaginationMiddleware',
64 'debug_toolbar.middleware.DebugToolbarMiddleware',
68 AUTHENTICATION_BACKENDS = (
69 'django.contrib.auth.backends.ModelBackend',
70 'django_cas_ng.backends.CASBackend',
73 ROOT_URLCONF = 'redakcja.urls'
79 'django.contrib.auth',
80 'django.contrib.contenttypes',
81 'django.contrib.sessions',
82 'django.contrib.messages',
83 'django.contrib.staticfiles',
84 'django.contrib.sites',
85 'admin_numeric_filter',
86 'django.contrib.admin',
87 'django.contrib.admindocs',
90 'fnp_django_pagination',
112 'wlxml.apps.WlxmlConfig',
120 INSTALLED_APPS += ('debug_toolbar',)
123 PROJECT_ROOT + "/locale-contrib",
126 LOGIN_REDIRECT_URL = '/documents/user'
128 LEGIMI_SMALL_WORDS = 2000
129 LEGIMI_BIG_WORDS = 10000
130 LEGIMI_SMALL_PRICE = 7
131 LEGIMI_BIG_PRICE = 20
133 THUMBNAIL_PRESERVE_FORMAT = True
135 STATICFILES_FINDERS = (
136 'django.contrib.staticfiles.finders.FileSystemFinder',
137 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
138 'pipeline.finders.PipelineFinder',
141 STATICFILES_STORAGE = 'pipeline.storage.PipelineManifestStorage'
144 'CSS_COMPRESSOR': None,
145 'JS_COMPRESSOR': None,
147 'libsasscompiler.LibSassCompiler',
150 # CSS and JS files to compress
153 'source_filenames': (
160 'css/imgareaselect-default.css',
163 'wiki/scss/splitter.scss',
164 'wiki/scss/visual.scss'
166 'output_filename': 'compressed/detail_styles.css',
169 'source_filenames': (
172 'output_filename': 'compressed/documents_styles.css',
175 'source_filenames': (
178 'output_filename': 'compressed/book.css',
181 'source_filenames': (
184 'output_filename': 'compressed/book_list.css',
188 # everything except codemirror
190 'source_filenames': (
192 'js/lib/jquery/jquery.blockui.js',
193 'js/lib/jquery/jquery.elastic.js',
194 'js/lib/jquery/jquery.xmlns.js',
195 'js/button_scripts.js',
200 'js/wiki/wikiapi.js',
206 'js/wiki/toolbar.js',
211 'js/wiki/dialog_save.js',
212 'js/wiki/dialog_revert.js',
213 'js/wiki/dialog_pubmark.js',
216 'js/wiki/view_sidebar.js',
217 'js/wiki/view_history.js',
218 'js/wiki/view_summary.js',
219 'js/wiki/view_editor_source.js',
220 'js/wiki/view_editor_wysiwyg.js',
221 'js/wiki/view_gallery.js',
222 'js/wiki/view_annotations.js',
223 'js/wiki/view_properties.js',
224 'js/wiki/view_search.js',
225 'js/wiki/view_column_diff.js',
227 'output_filename': 'compressed/detail_scripts.js',
230 'source_filenames': (
232 'js/lib/jquery/jquery.blockui.js',
233 'js/lib/jquery/jquery.elastic.js',
234 'js/lib/jquery/jquery.imgareaselect.js',
235 'js/button_scripts.js',
239 'js/wiki_img/wikiapi.js',
243 'js/wiki_img/base.js',
244 'js/wiki/toolbar.js',
247 'js/wiki/dialog_save.js',
248 'js/wiki/dialog_revert.js',
249 'js/wiki/dialog_pubmark.js',
252 'js/wiki_img/view_editor_objects.js',
253 'js/wiki_img/view_editor_motifs.js',
254 'js/wiki/view_editor_source.js',
255 'js/wiki/view_history.js',
256 'js/wiki/view_column_diff.js',
258 'output_filename': 'compressed/detail_img_scripts.js',
261 'source_filenames': (
262 'js/documents/documents.js',
264 'email_mangler/email_mangler.js',
266 'output_filename': 'compressed/documents_scripts.js',
269 'source_filenames': (
270 'js/lib/jquery/jquery.cycle2.min.js',
271 'js/book_text/jquery.eventdelegation.js',
272 'js/book_text/jquery.scrollto.js',
273 'js/book_text/jquery.highlightfade.js',
274 'js/book_text/book.js',
276 'output_filename': 'compressed/book.js',
279 'source_filenames': (
280 'js/documents/book_list.js',
282 'output_filename': 'compressed/book_list.js',
288 DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
291 SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
295 'DEFAULT_AUTHENTICATION_CLASSES': [
296 'rest_framework.authentication.SessionAuthentication',
297 'redakcja.api.auth.TokenAuthentication',
299 'DEFAULT_FILTER_BACKENDS': [
300 'django_filters.rest_framework.DjangoFilterBackend',
301 'rest_framework.filters.SearchFilter',
313 TEST_INTEGRATION = False
323 integrations=[DjangoIntegration()]