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-08-16 12:49:58 +00:00
|
|
|
from .views import (ChildViewSet, DiaperChangeViewSet, FeedingViewSet,
|
2017-08-16 22:33:02 +00:00
|
|
|
NoteViewSet, SleepViewSet, TimerViewSet, TummyTimeViewSet)
|
2017-08-13 13:44:48 +00:00
|
|
|
|
|
|
|
router = routers.DefaultRouter()
|
2017-08-16 12:49:58 +00:00
|
|
|
router.register(r'children', ChildViewSet)
|
2017-08-17 16:17:51 +00:00
|
|
|
router.register(r'changes', DiaperChangeViewSet)
|
2017-08-13 15:59:14 +00:00
|
|
|
router.register(r'feedings', FeedingViewSet)
|
2017-08-13 20:48:16 +00:00
|
|
|
router.register(r'notes', NoteViewSet)
|
2017-08-13 14:48:16 +00:00
|
|
|
router.register(r'sleep', SleepViewSet)
|
2017-08-16 22:33:02 +00:00
|
|
|
router.register(r'timers', TimerViewSet)
|
2017-08-13 19:51:25 +00:00
|
|
|
router.register(r'tummy-times', TummyTimeViewSet)
|
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'))
|
|
|
|
]
|