fix API urls and docs

This commit is contained in:
Petr Dlouhý 2022-09-23 19:51:59 +02:00
parent f7aa994571
commit 79405d4a2d
2 changed files with 2 additions and 1 deletions

View file

@ -3,4 +3,4 @@ from rest_framework.routers import DefaultRouter
from .viewsets import CategoryViewSet
router = DefaultRouter()
router.register(r"categories", CategoryViewSet, base_name="categories")
router.register(r"categories", CategoryViewSet, basename="categories")

View file

@ -12,6 +12,7 @@ If you have installed Django REST framework, all you have to do is add categorie
.. code-block:: python
from rest_framework.routers import DefaultRouter
from categories.api.urls import router as category_router
router = DefaultRouter()