Using Django Rest Framework's browsable API with APIViews?

后端 未结 6 1043
走了就别回头了
走了就别回头了 2020-12-24 01:32

If I have a view like:

class MyAPIView(APIView):
    def get(self, request, name=None):
        return {\"hello\": name or \"world\"}

How c

6条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-24 01:54

    For the record, it is 2019 now and https://bitbucket.org/hub9/django-hybrid-router is still working, only modification is that line 64 has to be edited to become:

                    regex = api_view_urls[api_view_key].pattern.regex
    

提交回复
热议问题