mirror of
https://github.com/jazzband/django-categories.git
synced 2026-04-05 16:00:57 +00:00
18 lines
451 B
ReStructuredText
18 lines
451 B
ReStructuredText
.. _api:
|
|
|
|
=========================================
|
|
Adding Django Rest framework API endpoint
|
|
=========================================
|
|
|
|
|
|
Registering the API
|
|
===================
|
|
|
|
If you have installed Django REST framework, all you have to do is add categories router to your router:
|
|
|
|
.. code-block:: python
|
|
|
|
from categories.api.urls import router as category_router
|
|
|
|
router = DefaultRouter()
|
|
router.registry.extend(category_router.registry)
|