Skip to content

Commit

Permalink
changed decorator as DRF doesn't support detail_route
Browse files Browse the repository at this point in the history
  • Loading branch information
AYaro authored Jan 22, 2020
1 parent 6d7d128 commit a4c908c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion refreshtoken/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@

from django.utils.translation import ugettext as _
from rest_framework import exceptions, generics, status, viewsets
from rest_framework.decorators import detail_route
from rest_framework.decorators import action
from rest_framework.permissions import AllowAny
from rest_framework.response import Response
from rest_framework_jwt.settings import api_settings
from functools import partial

from .models import RefreshToken
from .serializers import DelegateJSONWebTokenSerializer, RefreshTokenSerializer

detail_route = partial(action, detail=True)
jwt_payload_handler = api_settings.JWT_PAYLOAD_HANDLER
jwt_encode_handler = api_settings.JWT_ENCODE_HANDLER
jwt_response_payload_handler = api_settings.JWT_RESPONSE_PAYLOAD_HANDLER
Expand Down

0 comments on commit a4c908c

Please sign in to comment.