1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-22 14:29:36 +02:00

chore: Add TripViewSet and TripSerializer for managing trips

This commit is contained in:
Sean Morley 2024-07-09 13:26:39 -04:00
parent c0900876c6
commit 8f0a8b2cc8
5 changed files with 78 additions and 20 deletions

View file

@ -1,9 +1,10 @@
from django.urls import include, path
from rest_framework.routers import DefaultRouter
from .views import AdventureViewSet
from .views import AdventureViewSet, TripViewSet
router = DefaultRouter()
router.register(r'adventures', AdventureViewSet, basename='adventures')
router.register(r'trips', TripViewSet, basename='trips')
urlpatterns = [
# Include the router under the 'api/' prefix