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

2019-05-06 02:20发布

问题:

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:

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