[Django]-DRF Browsable API only shows one Router

3👍

This doesn’t have anything to do with Django REST framework, it happens because of how Django deals with duplicate urls.

You are trying to have a single url be handled by two different views: The DRF router index and the djoser root view. Django will only display the first view matching the search pattern that it finds, which is generally the first urls that are included in the url patterns.

Django REST framework will also not detect multiple routers that are available and group them together on the same page, which is sounds like you are hoping to see. Even if it could, djoser doesn’t use a router so there is no way that DRF could actually know to include it.

Is there anyway to get a unified api root without having to create my own custom view?

So to answer the main question: No it is not possible for Django REST framework to automatically group these views together. You are going to need to create your own customer view to handle this.

Leave a comment