In the latest DRF, you need to explicitly set base_name
in your viewset url if you don’t have queryset
defined.
So, something like this should do good:
router.register(r'my-model/', MyModelView, basename="MyModel")
See this: docs
In the latest DRF, you need to explicitly set base_name
in your viewset url if you don’t have queryset
defined.
So, something like this should do good:
router.register(r'my-model/', MyModelView, basename="MyModel")
See this: docs