django-rest-frameworkRouters


Introduction

Routing is the process of mapping the logic (view methods etc.) to a set of URLs. REST framework adds support for automatic URL routing to Django.

Syntax

  • router = routers.SimpleRouter()
  • router.register(prefix, viewset)
  • router.urls # the generated set of urls for the registered viewset.