The article introduces how to use DRF-Nested-Routers framework https://github.com/alanjds/drf-nested-routers to create URLs for nested resources. In this tutorial, our target is to create APIs for getting libraries and books.
/api/libraries/ -> Get list of libraries
/api/libraries/{library_id}/books/ -> Get list of book in a library
/api/libraries/{library_id}/books/{book_id} -> Get details of a book
#django #django-rest-framework