mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-24 15:29:36 +02:00
migration to new backend
This commit is contained in:
parent
28a5d423c2
commit
9abe9fb315
309 changed files with 21476 additions and 24132 deletions
16
backend/server/worldtravel/urls.py
Normal file
16
backend/server/worldtravel/urls.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
# travel/urls.py
|
||||
|
||||
from django.urls import include, path
|
||||
from rest_framework.routers import DefaultRouter
|
||||
from .views import CountryViewSet, RegionViewSet, VisitedRegionViewSet, regions_by_country, visits_by_country
|
||||
|
||||
router = DefaultRouter()
|
||||
router.register(r'countries', CountryViewSet)
|
||||
router.register(r'regions', RegionViewSet)
|
||||
router.register(r'visitedregion', VisitedRegionViewSet)
|
||||
|
||||
urlpatterns = [
|
||||
path('', include(router.urls)),
|
||||
path('<str:country_code>/regions/', regions_by_country, name='regions-by-country'),
|
||||
path('<str:country_code>/visits/', visits_by_country, name='visits-by-country'),
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue