duck-booking-tool/api/urls.py

28 lines
547 B
Python
Raw Normal View History

2015-05-27 22:33:19 +00:00
from django.conf.urls import patterns, url, include
from rest_framework import routers
2014-12-23 08:29:58 +00:00
2014-12-23 08:56:04 +00:00
from . import views
2015-05-27 22:33:19 +00:00
from . import viewsets
rest_router = routers.DefaultRouter()
rest_router.register(r'ducks', viewsets.DuckViewSet)
2014-12-23 08:56:04 +00:00
2014-12-23 08:29:58 +00:00
urlpatterns = patterns(
'',
2015-05-27 22:33:19 +00:00
url(
r'^',
include(rest_router.urls)
),
2015-01-22 15:22:57 +00:00
url(
r'^duck/book/$',
views.duck_book,
name = 'book'
),
url(
r'^duck/(?P<duck_id>\d+)/competence.json$',
views.DuckCompListView.as_view(),
name = 'complist'
),
2014-12-23 08:29:58 +00:00
)