X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/5489720d4099540b381b9fbc0e727c2fd8e52936..c06d9009a2f0caff4557384179078b4e45edfb8d:/src/redakcja/settings/__init__.py?ds=sidebyside diff --git a/src/redakcja/settings/__init__.py b/src/redakcja/settings/__init__.py index 9bca2631..46b80da1 100644 --- a/src/redakcja/settings/__init__.py +++ b/src/redakcja/settings/__init__.py @@ -88,8 +88,12 @@ INSTALLED_APPS = ( 'fnpdjango', 'django_cas_ng', 'bootstrap4', + 'rest_framework', + 'django_filters', + 'redakcja.api', 'catalogue', + 'depot', 'documents', 'cover', 'dvcs', @@ -266,6 +270,18 @@ PIPELINE = { SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer' +REST_FRAMEWORK = { + 'DEFAULT_AUTHENTICATION_CLASSES': [ + 'rest_framework.authentication.SessionAuthentication', + 'redakcja.api.auth.TokenAuthentication', + ], + 'DEFAULT_FILTER_BACKENDS': [ + 'django_filters.rest_framework.DjangoFilterBackend', + 'rest_framework.filters.SearchFilter', + ] +} + + try: SENTRY_DSN except NameError: