Commit 170c2384 authored by Arkadiusz Hiler's avatar Arkadiusz Hiler
Browse files

Update Django Rest Framework to 3.9


Signed-off-by: default avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>
parent 68797f9c
python-dateutil>2.0,<3.0
djangorestframework>=3.6,<3.7
djangorestframework>=3.9,<3.10
drf-nested-routers
jsonfield
django-filter>=1.1.0,<1.2.0
......
......@@ -42,9 +42,12 @@ from patchwork.views import patch_to_mbox, revision_cover_letter_to_mbox
from patchwork.views.patch import mbox as patch_mbox
from patchwork.permissions import Can
from patchwork.utils import group
from django_filters.rest_framework import DjangoFilterBackend
import django_filters
API_REVISION = 4
......@@ -87,7 +90,7 @@ class MaintainerPermission(permissions.BasePermission):
return Can(request.user).edit(obj.project)
class RequestDjangoFilterBackend(filters.DjangoFilterBackend):
class RequestDjangoFilterBackend(DjangoFilterBackend):
"""A DjangoFilterBackend class that also includes the request"""
def filter_queryset(self, request, queryset, view):
......@@ -637,7 +640,7 @@ class EventLogViewSet(mixins.ListModelMixin,
permission_classes = (MaintainerPermission, )
queryset = EventLog.objects.all().select_related('event')
serializer_class = EventLogSerializer
filter_backends = (filters.DjangoFilterBackend, filters.OrderingFilter)
filter_backends = (DjangoFilterBackend, filters.OrderingFilter)
filter_class = EventFilter
def get_queryset(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment