2017-08-13 21:06:11 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
2017-08-13 13:44:48 +00:00
|
|
|
from django.conf.urls import url, include
|
|
|
|
from rest_framework import routers
|
|
|
|
|
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)
|
|
|
|
router.register(r'timers', views.TimerViewSet)
|
|
|
|
router.register(r'tummy-times', views.TummyTimeViewSet)
|
|
|
|
router.register(r'weight', views.WeightViewSet)
|
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 = [
|
|
|
|
url(r'^api/', include(router.urls)),
|
2017-08-16 16:46:26 +00:00
|
|
|
url(r'^api/auth/', include('rest_framework.urls',
|
2017-08-13 13:44:48 +00:00
|
|
|
namespace='rest_framework'))
|
|
|
|
]
|