mybuddy/api/urls.py

20 lines
691 B
Python
Raw Normal View History

from django.conf.urls import url, include
from rest_framework import routers
2017-08-13 19:51:25 +00:00
from .views import (BabyViewSet, DiaperChangeViewSet, FeedingViewSet,
2017-08-13 20:48:16 +00:00
NoteViewSet, SleepViewSet, TummyTimeViewSet)
router = routers.DefaultRouter()
2017-08-13 14:48:16 +00:00
router.register(r'babies', BabyViewSet)
2017-08-13 19:51:25 +00:00
router.register(r'diaper-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-13 19:51:25 +00:00
router.register(r'tummy-times', TummyTimeViewSet)
urlpatterns = [
url(r'^api/', include(router.urls)),
url(r'^api-auth/', include('rest_framework.urls',
namespace='rest_framework'))
]