Merge commit 'afb3cc28'
[wolnelektury.git] / src / wolnelektury / settings / contrib.py
1 # -*- coding: utf-8 -*-
2 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
3 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
4 #
5 from fnpdjango.utils.text.textilepl import textile_pl
6 from migdal import EntryType
7 from django.utils.translation import ugettext_lazy as _
8
9 HONEYPOT_FIELD_NAME = 'miut'
10 PAGINATION_INVALID_PAGE_RAISES_404 = True
11 THUMBNAIL_QUALITY = 95
12
13 MODELTRANSLATION_DEFAULT_LANGUAGE = 'pl'
14 MODELTRANSLATION_PREPOPULATE_LANGUAGE = 'pl'
15
16 MIGRATION_MODULES = {
17     'getpaid': 'wolnelektury.migrations.getpaid',
18     'piston': 'wolnelektury.migrations.piston',
19 }
20
21 GETPAID_ORDER_DESCRIPTION = "{% load funding_tags %}{{ order|sanitize_payment_title }}"
22
23 GETPAID_BACKENDS = (
24     'getpaid.backends.payu',
25 )
26
27 PIWIK_URL = ''
28 PIWIK_SITE_ID = 0
29 PIWIK_TOKEN = ''
30
31 PAYPAL_CONFIG = {
32     'mode': 'sandbox',  # sandbox or live
33     'client_id': '',
34     'client_secret': '',
35 }
36
37 MARKUP_FIELD_TYPES = (
38     ('textile_pl', textile_pl),
39 )
40
41 MIGDAL_TYPES = (
42     EntryType('news', _('news'), commentable=False, on_main=True, promotable=True),
43     EntryType('publications', _('publications'), commentable=False),
44     EntryType('info', _('info'), commentable=False),
45     EntryType('event', _('events'), commentable=False),
46 )
47
48 REST_FRAMEWORK = {
49     "DEFAULT_RENDERER_CLASSES": (
50         'rest_framework.renderers.JSONRenderer',
51         'rest_framework.renderers.BrowsableAPIRenderer',
52         'api.renderers.LegacyXMLRenderer',
53     ),
54     'DEFAULT_AUTHENTICATION_CLASSES': (
55         'api.drf_auth.PistonOAuthAuthentication',
56     )
57 }