Need help understanding how to get consistent behaviour with the Browsable API

28 views
Skip to first unread message

Chris Routh

unread,
Mar 28, 2018, 11:15:01 AM3/28/18
to Django REST framework
Hi,

I'm currently developing an app with django-rest-framework, and as a requirement for the dev and testing environments we are trying to ensure that all API viewsets are visible in the ApiRoot.

However from what I can tell, if a view does not have a create view, it will not display in the API view and trying to hit the endpoint results in a 404.

Currenltly I'm trying to figure out why and where the documentation is regarding this behaviour, because so far there doesn't seem to be any mention of this.

For example: 

class UpdateRetrieveView(RetrieveModelMixin, UpdateModelMixin, GenericViewSet):

This will not display in the API, add the CreateModelMixin however, and it will..
Reply all
Reply to author
Forward
0 new messages