вот мой код:
from rest_framework import routers
from rest_framework.routers import DefaultRouter
from .api import ListViewSet, CardViewSet
router = DefaultRouter()
router.register(r'lists', ListViewSet,'lists')
router.register(r'cards', CardViewSet, 'cards')
urlpatterns = router.urls
но когда я запускаю сервер, я получаю эту ошибку:
Page not found (404) Request Method:
GET Request URL: http://localhost:8000/scrumboard/cards Using the URLconf defined in djangularApp.urls, Django tried these URL patterns, in this order:
^admin/ ^$ ^scrumboard ^lists/$ [name='lists-list'] ^scrumboard
^lists\.(?P<format>[a-z0-9]+)/?$ [name='lists-list'] ^scrumboard
^lists/(?P<pk>[^/.]+)/$ [name='lists-detail'] ^scrumboard
^lists/(?P<pk>[^/.]+)\.(?P<format>[a-z0-9]+)/?$ [name='lists-detail']
^scrumboard ^cards/$ [name='cards-list'] ^scrumboard
^cards\.(?P<format>[a-z0-9]+)/?$ [name='cards-list'] ^scrumboard
^cards/(?P<pk>[^/.]+)/$ [name='cards-detail'] ^scrumboard
^cards/(?P<pk>[^/.]+)\.(?P<format>[a-z0-9]+)/?$ [name='cards-detail']
^scrumboard ^$ [name='api-root'] ^scrumboard
^\.(?P<format>[a-z0-9]+)/?$ [name='api-root']
The current path, scrumboard/cards, didn't match any of these.
Вы видите эту ошибку, потому что в вашем Django есть DEBUG = True
файл настроек. Измените это на False, и Django отобразит стандартную страницу 404.