In the context of django-rest-framework is the Web

2019-05-06 01:37发布

I've been looking into django-rest-framework.

Tell me if my impressions are correct.

It is meant to help you create restful API endpoints for your web app.

It is NOT meant to generate your actual website. The class-based views included in rest_framework (APIView, generics.ListCreateAPIView, etc) are not supposed to be used to render to web pages themselves.

So does this mean you are supposed to have one set of urls for this api and another set for accessing and navigating the website?

1条回答
神经病院院长
2楼-- · 2019-05-06 02:09

It is meant to help you create restful API endpoints for your web app.

yes

It is NOT meant to generate your actual website. The class-based views included in rest_framework (APIView, generics.ListCreateAPIView, etc) are not supposed to be used to render to web pages themselves.

yes

So does this mean you are supposed to have one set of urls for this api and another set for accessing and navigating the website?

exactly

查看更多
登录 后发表回答