mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 03:29:23 +02:00
Updated rest framework to 3.9
This commit is contained in:
parent
4a6df06360
commit
14392ebb0c
14 changed files with 187 additions and 116 deletions
|
@ -1,9 +1,9 @@
|
|||
from rest_framework import response
|
||||
from rest_framework.decorators import list_route
|
||||
from rest_framework import decorators
|
||||
|
||||
|
||||
def action_route(serializer_class):
|
||||
@list_route(methods=["post"])
|
||||
@decorators.action(methods=["post"], detail=False)
|
||||
def action(self, request, *args, **kwargs):
|
||||
queryset = self.get_queryset()
|
||||
serializer = serializer_class(request.data, queryset=queryset)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue