1👍
You are getting the API root page when you visit "/" because you have two urls for same path
path('', include(router.urls)),
path("", views.home, name="home")
It is first matched with router.urls
that’s why it is going to api root page. If you want to get home page on "/" then change the first url.
Also you make use of API from Javascript by using something as fetch.
Also I think you need to learn bit more about DRF before jumping into the project. You can check documentation here. You can also learn from youtube, there are a bunch of good content teaching you about DRF.
Source:stackexchange.com