2017-08-13 21:06:11 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
2017-12-13 23:12:32 +00:00
|
|
|
from django.urls import include, path
|
2017-08-13 13:44:48 +00:00
|
|
|
from rest_framework import routers
|
2020-06-19 21:56:05 +00:00
|
|
|
from rest_framework.schemas import get_schema_view
|
2017-08-13 13:44:48 +00:00
|
|
|
|
2017-11-10 02:15:09 +00:00
|
|
|
from . import views
|
|
|
|
|
2017-08-13 13:44:48 +00:00
|
|
|
router = routers.DefaultRouter()
|
2017-11-10 02:15:09 +00:00
|
|
|
router.register(r'children', views.ChildViewSet)
|
|
|
|
router.register(r'changes', views.DiaperChangeViewSet)
|
|
|
|
router.register(r'feedings', views.FeedingViewSet)
|
|
|
|
router.register(r'notes', views.NoteViewSet)
|
|
|
|
router.register(r'sleep', views.SleepViewSet)
|
2019-05-17 05:13:14 +00:00
|
|
|
router.register(r'temperature', views.TemperatureViewSet)
|
2017-11-10 02:15:09 +00:00
|
|
|
router.register(r'timers', views.TimerViewSet)
|
|
|
|
router.register(r'tummy-times', views.TummyTimeViewSet)
|
|
|
|
router.register(r'weight', views.WeightViewSet)
|
2021-12-29 07:53:36 +00:00
|
|
|
router.register(r'height', views.HeightViewSet)
|
|
|
|
router.register(r'head-circumference', views.HeadCircumferenceViewSet)
|
|
|
|
router.register(r'bmi', views.BMIViewSet)
|
2017-08-13 13:44:48 +00:00
|
|
|
|
2017-12-03 21:52:27 +00:00
|
|
|
app_name = 'api'
|
|
|
|
|
2017-08-13 13:44:48 +00:00
|
|
|
urlpatterns = [
|
2017-12-13 23:12:32 +00:00
|
|
|
path('api/', include(router.urls)),
|
|
|
|
path('api/auth/', include(
|
|
|
|
'rest_framework.urls',
|
|
|
|
namespace='rest_framework'
|
2020-06-19 21:56:05 +00:00
|
|
|
)),
|
|
|
|
path('api/schema', get_schema_view(
|
|
|
|
title='Baby Buddy API',
|
|
|
|
version=1,
|
|
|
|
description='API documentation for the Baby Buddy application'
|
|
|
|
), name='openapi-schema'),
|
2017-08-13 13:44:48 +00:00
|
|
|
]
|