Hello

I defined a view for Test 
class UserView(APIView):
    http_method_names = ['get']

    def get(self, request):
        # Your code to handle the GET request goes here
        return Response("This is a GET request")


I added the view in urls.py

urlpatterns = [
    path('', include(router.urls)),
    path('userinfo/', UserView.as_view(), name='userinfo'),
]

when I call the view http://localhost:8000/schedule/userinfo/
I get teh expected response
[image: Capture d’écran 2024-06-06 204155.png] 
but the API is not displayed in API Root
[image: Capture d’écran 2024-06-06 204523.png]
what I missed? 

-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-rest-framework+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-rest-framework/850234b7-c51c-47eb-8feb-4c95bf49248bn%40googlegroups.com.

Reply via email to