Routing API Views in Django Rest Framework?

前端 未结 2 1290
再見小時候
再見小時候 2020-12-15 18:05

Is there any common pattern for routing APIViews (ie, not ViewSets) with Django Rest Framework?

For example, if I\'ve got an API V

2条回答
  •  忘掉有多难
    2020-12-15 18:35

    Is there any standard pattern — apart from writing out a standard Django URL router — for routing that view?

    ViewSets & Routers are the pattern if you want standardised routing.

    If you're using views then just use a regular Django URLconf.

提交回复
热议问题