Systemy-rozmyte-sql/backend/cars/urls.py

12 lines
369 B
Python
Raw Normal View History

2022-01-03 00:09:16 +01:00
from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import CarViews
# Create a router and register our viewsets with it.
router = DefaultRouter()
router.register(r'cars', CarViews.as_view(), name="cars")
# The API URLs are now determined automatically by the router.
urlpatterns = [
path('', include(router.urls)),
]