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',
56 'maintenancemode.middleware.MaintenanceModeMiddleware',
61 'debug_toolbar.middleware.DebugToolbarMiddleware',
65 AUTHENTICATION_BACKENDS = (
66 'django.contrib.auth.backends.ModelBackend',
67 'django_cas_ng.backends.CASBackend',
70 ROOT_URLCONF = 'redakcja.urls'
73 'django.contrib.auth',
74 'django.contrib.contenttypes',
75 'django.contrib.sessions',
76 'django.contrib.messages',
77 'django.contrib.staticfiles',
78 'django.contrib.sites',
79 'django.contrib.admin',
80 'django.contrib.admindocs',
83 'fnp_django_pagination',
103 INSTALLED_APPS += ('debug_toolbar',)
105 LOGIN_REDIRECT_URL = '/documents/user'
107 MIN_COVER_SIZE = (915, 1270)
109 STATICFILES_FINDERS = (
110 'django.contrib.staticfiles.finders.FileSystemFinder',
111 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
112 'pipeline.finders.PipelineFinder',
115 STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
118 'CSS_COMPRESSOR': None,
119 'JS_COMPRESSOR': None,
121 'libsasscompiler.LibSassCompiler',
124 # CSS and JS files to compress
127 'source_filenames': (
134 'css/imgareaselect-default.css',
137 'wiki/scss/splitter.scss',
138 'wiki/scss/visual.scss'
140 'output_filename': 'compressed/detail_styles.css',
143 'source_filenames': (
146 'output_filename': 'compressed/documents_styles.css',
149 'source_filenames': (
152 'output_filename': 'compressed/book.css',
155 'source_filenames': (
158 'output_filename': 'compressed/book_list.css',
162 # everything except codemirror
164 'source_filenames': (
166 'js/lib/jquery/jquery.blockui.js',
167 'js/lib/jquery/jquery.elastic.js',
168 'js/lib/jquery/jquery.xmlns.js',
169 'js/button_scripts.js',
173 'js/wiki/wikiapi.js',
179 'wiki/js/sidebar-perspective.js',
180 'js/wiki/toolbar.js',
183 'js/wiki/dialog_save.js',
184 'js/wiki/dialog_revert.js',
185 'js/wiki/dialog_pubmark.js',
188 'js/wiki/view_history.js',
189 'js/wiki/view_summary.js',
190 'js/wiki/view_editor_source.js',
191 'js/wiki/view_editor_wysiwyg.js',
192 'js/wiki/view_gallery.js',
193 'js/wiki/view_annotations.js',
194 'js/wiki/view_search.js',
195 'js/wiki/view_column_diff.js',
197 'output_filename': 'compressed/detail_scripts.js',
200 'source_filenames': (
202 'js/lib/jquery/jquery.blockui.js',
203 'js/lib/jquery/jquery.elastic.js',
204 'js/lib/jquery/jquery.imgareaselect.js',
205 'js/button_scripts.js',
209 'js/wiki_img/wikiapi.js',
213 'js/wiki_img/base.js',
214 'js/wiki/toolbar.js',
217 'js/wiki/dialog_save.js',
218 'js/wiki/dialog_revert.js',
219 'js/wiki/dialog_pubmark.js',
222 'js/wiki_img/view_editor_objects.js',
223 'js/wiki_img/view_editor_motifs.js',
224 'js/wiki/view_editor_source.js',
225 'js/wiki/view_history.js',
226 'js/wiki/view_column_diff.js',
228 'output_filename': 'compressed/detail_img_scripts.js',
231 'source_filenames': (
232 'js/documents/documents.js',
234 'email_mangler/email_mangler.js',
236 'output_filename': 'compressed/documents_scripts.js',
239 'source_filenames': (
240 'js/lib/jquery/jquery.cycle2.min.js',
241 'js/book_text/jquery.eventdelegation.js',
242 'js/book_text/jquery.scrollto.js',
243 'js/book_text/jquery.highlightfade.js',
244 'js/book_text/book.js',
246 'output_filename': 'compressed/book.js',
249 'source_filenames': (
250 'js/documents/book_list.js',
252 'output_filename': 'compressed/book_list.js',
258 SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
268 integrations=[DjangoIntegration()]