I\'m having an issue adding a custom URL to a ModelViewSet in django-rest-framework. Here\'s an example of my main urls.py
router = routers.DefaultRouter() r
Pull the list method out as a separate view:
post_list = PostViewSet.as_view({'get': 'list'})
Then map this to your date-based lookup URL as you usually would, setting parameters for year, month and day.
In get_queryset you can check if these kwargs are set and, if so, filter the queryset.
get_queryset