X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/6c74d7c9389a009ecda329c445d8f15c75326229..a791ae7c71b918ca39e7083209019de03a164252:/src/wolnelektury/settings/contrib.py diff --git a/src/wolnelektury/settings/contrib.py b/src/wolnelektury/settings/contrib.py index b0165c3de..a25ef72d9 100644 --- a/src/wolnelektury/settings/contrib.py +++ b/src/wolnelektury/settings/contrib.py @@ -3,6 +3,8 @@ # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from fnpdjango.utils.text.textilepl import textile_pl +from migdal import EntryType +from django.utils.translation import ugettext_lazy as _ HONEYPOT_FIELD_NAME = 'miut' PAGINATION_INVALID_PAGE_RAISES_404 = True @@ -35,3 +37,21 @@ PAYPAL_CONFIG = { MARKUP_FIELD_TYPES = ( ('textile_pl', textile_pl), ) + +MIGDAL_TYPES = ( + EntryType('news', _('news'), commentable=False, on_main=True, promotable=True), + EntryType('publications', _('publications'), commentable=False), + EntryType('info', _('info'), commentable=False), + EntryType('event', _('events'), commentable=False), +) + +REST_FRAMEWORK = { + "DEFAULT_RENDERER_CLASSES": ( + 'rest_framework.renderers.JSONRenderer', + 'rest_framework.renderers.BrowsableAPIRenderer', + 'api.renderers.LegacyXMLRenderer', + ), + 'DEFAULT_AUTHENTICATION_CLASSES': ( + 'api.drf_auth.PistonOAuthAuthentication', + ) +}