Introduce DRF and start replacing the views.
[wolnelektury.git] / src / catalogue / api / urls.py
1 # -*- coding: utf-8 -*-
2 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
3 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
4 #
5 from django.conf.urls import include, url
6 from . import views
7
8
9 urlpatterns = [
10     # books by collections
11     url(r'^collections/$', views.CollectionList.as_view(), name="api_collections"),
12     url(r'^collections/(?P<slug>[^/]+)/$',
13         views.CollectionDetail.as_view(), name="collection-detail"),
14
15     url(r'^books/(?P<slug>[^/]+)/$', views.BookDetail.as_view(), name='catalogue_api_book'),
16 ]