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
'''
Inspired by https://stackoverflow.com/a/36289332
'''
from django_filters.rest_framework import (BaseInFilter, Filter, FilterSet,
UUIDFilter)
from ..models import Note, Session
class ExtIdFilter(BaseInFilter, UUIDFilter):
pass
class CoreFilterSet(FilterSet):
ext_id__in = ExtIdFilter(field_name='ext_id')
class SessionFilterSet(CoreFilterSet):
class Meta:
model = Session
fields = ['ext_id__in']
class NoteFilterSet(CoreFilterSet):
class Meta:
model = Note
fields = ['ext_id__in']