Created
July 1, 2016 21:57
-
-
Save jramnani/d00798d346d796d2ceaf3645f4f2f231 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The code: | |
class MyView(APIView): | |
authentication_classes = (TokenAuthentication,) | |
permission_classes = (IsAuthenticated,) | |
@csrf.csrf_exempt | |
def get(self, request): | |
return Response({}, status=200) | |
@csrf.csrf_exempt | |
@authentication_classes([]) | |
@permission_classes([]) | |
def post(self, request): | |
"""Create a new user.""" | |
return Response({}, status=201) | |
# Error Message | |
File "/path/to/app/tests/api/test_views.py", line 241, in <module> | |
class MyView(APIView): | |
File "/path/to/app/tests/api/views.py", line 256, in MyView | |
@authentication_classes([]) | |
TypeError: 'tuple' object is not callable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment