Change the settings to avoid using Session authentication for rest framework as it raise exceptions in case client and backend are on the same domain
authorymh <ymh.work@gmail.com>
Fri, 30 Nov 2018 10:53:15 +0100
changeset 183 f8f3af9e5c83
parent 182 2dbb6ddbf645
child 184 aac6db7cea99
Change the settings to avoid using Session authentication for rest framework as it raise exceptions in case client and backend are on the same domain On the filter, adapt to take into account new version of django_filters
src/irinotes/settings.py
src/notes/api/filters.py
--- a/src/irinotes/settings.py	Wed Nov 28 18:33:20 2018 +0100
+++ b/src/irinotes/settings.py	Fri Nov 30 10:53:15 2018 +0100
@@ -249,7 +249,6 @@
     ],
     'DEFAULT_AUTHENTICATION_CLASSES': (
         'rest_framework_jwt.authentication.JSONWebTokenAuthentication',
-        'rest_framework.authentication.SessionAuthentication',
         'rest_framework.authentication.BasicAuthentication',
     ),
     'TEST_REQUEST_DEFAULT_FORMAT': 'json',
--- a/src/notes/api/filters.py	Wed Nov 28 18:33:20 2018 +0100
+++ b/src/notes/api/filters.py	Fri Nov 30 10:53:15 2018 +0100
@@ -10,7 +10,7 @@
     pass
 
 class CoreFilterSet(FilterSet):
-    ext_id__in = ExtIdFilter(name='ext_id')
+    ext_id__in = ExtIdFilter(field_name='ext_id')
 
 class SessionFilterSet(CoreFilterSet):
     class Meta: