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:
parent
c0900876c6
commit
8f0a8b2cc8
5 changed files with 78 additions and 20 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue