Django Rest Framework: URL for associated elements
问题 I have the following API endpoints already created and working fine: urls.py: router = DefaultRouter() router.register(r'countries', views.CountriesViewSet, base_name='datapoints') router.register(r'languages', views.LanguageViewSet, base_name='records') Now, I need to create a new endpoint, where I can retrieve the countries associated with one language (let's suppose that one country has just one associated language). For that purpose, I would create a new endpoint with the following URL