Minor upgrades and test fixes.
[wolnelektury.git] / src / wolnelektury / settings / contrib.py
1 # This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
3 #
4 HONEYPOT_FIELD_NAME = 'miut'
5 PAGINATION_INVALID_PAGE_RAISES_404 = True
6 THUMBNAIL_QUALITY = 95
7 THUMBNAIL_ALTERNATIVE_RESOLUTIONS = [2]
8 THUMBNAIL_PRESERVE_FORMAT = True
9
10 MODELTRANSLATION_DEFAULT_LANGUAGE = 'pl'
11 MODELTRANSLATION_PREPOPULATE_LANGUAGE = 'pl'
12
13 PIWIK_URL = ''
14 PIWIK_SITE_ID = 0
15 PIWIK_TOKEN = ''
16
17 PAYPAL_CONFIG = {
18     'mode': 'sandbox',  # sandbox or live
19     'client_id': '',
20     'client_secret': '',
21 }
22 PAYPAL_ENABLED = True
23
24 REST_FRAMEWORK = {
25     "DEFAULT_RENDERER_CLASSES": (
26         'rest_framework.renderers.JSONRenderer',
27         'rest_framework.renderers.BrowsableAPIRenderer',
28         'api.renderers.LegacyXMLRenderer',
29     ),
30     'DEFAULT_AUTHENTICATION_CLASSES': (
31         'api.drf_auth.WLTokenAuthentication',
32         'api.drf_auth.PistonOAuthAuthentication',
33         'rest_framework.authentication.SessionAuthentication',
34     ),
35     'DEFAULT_PAGINATION_CLASS': 'api.pagination.WLLimitOffsetPagination',
36     'PAGE_SIZE': 10,
37     'DEFAULT_VERSIONING_CLASS': 'rest_framework.versioning.NamespaceVersioning',
38 }
39
40
41 DEBUG_TOOLBAR_CONFIG = {
42     'RESULTS_CACHE_SIZE': 100,
43 }
44
45
46 HAYSTACK_CONNECTIONS = {
47     'default': {
48         'ENGINE': 'haystack.backends.simple_backend.SimpleEngine',
49     },
50 }
51
52
53 FORMS_BUILDER_USE_SITES = False
54 FORMS_BUILDER_EDITABLE_FIELD_MAX_LENGTH = True
55 FORMS_BUILDER_EDITABLE_SLUGS = True
56 FORMS_BUILDER_EXTRA_FIELDS = [
57         (100, 'contact.fields.HeaderField', 'Header'),
58         (101, 'contact.fields.SeparatorField', 'Separator'),
59 ]
60 FORMS_BUILDER_REQUIRED_CSS_CLASS = 'required'
61 FORMS_BUILDER_INACTIVE_VISIBLE = True
62 FORMS_BUILDER_TEMPLATE_NAME_P = 'forms/p.html'