simple-plant-archive-django/plant_catalog/catalog/urls.py

9 lines
393 B
Python
Raw Normal View History

2024-10-05 17:30:35 +02:00
# catalog/urls.py
from django.urls import path
from .api_views import PlantListCreateAPIView, PlantRetrieveUpdateDestroyAPIView
urlpatterns = [
path('api/plants/', PlantListCreateAPIView.as_view(), name='plant_list_create'), # List and Create
path('api/plants/<int:pk>/', PlantRetrieveUpdateDestroyAPIView.as_view(), name='plant_detail_update_delete'), # Retrieve, Update, Delete
]