title: "detail": "Method \"GET\" not allowed." Django Rest Framework
body: <p>I know this question maybe a duplicate, but I have tried many solutions and could not understand any. I have followed this tutorial exactly and yet I get this error on the 'userlist' page. Everything else works just fine. Can somebody point out what the error is ?</p>
  
  <pre><code>class UserList(APIView):
  """
  Create a new user. It's called 'UserList' because normally we'd have a get
  method here too, for retrieving a list of all User objects.
  """
  
  permission_classes = (permissions.AllowAny,)
  http_method_names = ['get', 'head']
  
  def post (self, request, format=None):
      self.http_method_names.append("GET")
  
      serializer = UserSerializerWithToken(data=request.data)
      if serializer.is_valid():
          serializer.save()
          return Response(serializer.data, status=status.HTTP_201_CREATED)
      return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
  </code></pre>
  
  <p>EDIT:
  urls.py</p>
  
  <pre><code>from django.urls import include, path
  from classroom.views.classroom import current_user, UserList
  from .views import classroom, suppliers, teachers
  urlpatterns = [path('', classroom.home, name='home'),
                 path('current_user/', current_user),
                 path('users/', UserList.as_view()),
  </code></pre>
  
  <p>Edit: </p>
  
  <p>Still getting this error,</p>
  
  <p><a href="https://i.stack.imgur.com/PjR1V.png" rel="noreferrer"><img src="https://i.stack.imgur.com/PjR1V.png" alt="err"></a></p>