from rest_framework_jwt.views import obtain_jwt_token, refresh_jwt_token
urlpatterns = [
url(r'^api-token-auth/', obtain_jwt_token),
]
AttributeError at /api-token-auth/
'NoneType' object has no attribute 'is_authenticated'
when i change the source code, add throttle_classes = () , it's work!!! and i don't kown why????
class JSONWebTokenAPIView(APIView):
"""
Base API View that various JWT interactions inherit from.
"""
permission_classes = ()
authentication_classes = ()
REST_FRAMEWORK = { "DEFAULT_RENDERER_CLASSES": ( "rest_framework.renderers.JSONRenderer", ), 'DEFAULT_AUTHENTICATION_CLASSES': ( 'rest_framework.authentication.BasicAuthentication',
'rest_framework.authentication.SessionAuthentication',
), 'UNICODE_JSON': False,
'EXCEPTION_HANDLER': 'user.exception_handler.custom_exception_handler',
}
from rest_framework_jwt.views import obtain_jwt_token, refresh_jwt_token urlpatterns = [ url(r'^api-token-auth/', obtain_jwt_token), ] AttributeError at /api-token-auth/ 'NoneType' object has no attribute 'is_authenticated'
when i change the source code, add throttle_classes = () , it's work!!! and i don't kown why???? class JSONWebTokenAPIView(APIView): """ Base API View that various JWT interactions inherit from. """ permission_classes = () authentication_classes = ()
add throttle_classes = () , it's work!!!