X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/5489720d4099540b381b9fbc0e727c2fd8e52936..52d79280796679d28fb526063c77c43851ae52c4:/src/redakcja/settings/__init__.py 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: