From c08f0761c5c49c666d22223ff18e1da5a6b73d37 Mon Sep 17 00:00:00 2001 From: Johannes Christ Date: Thu, 16 Aug 2018 21:49:19 +0200 Subject: Add a simple `list` / `retrieve` documentation link endpoint. --- api/urls.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api/urls.py') diff --git a/api/urls.py b/api/urls.py index b0e104cd..78a310f6 100644 --- a/api/urls.py +++ b/api/urls.py @@ -2,13 +2,15 @@ from django.urls import include, path from rest_framework.routers import SimpleRouter from .views import HealthcheckView -from .viewsets import SnakeNameViewSet +from .viewsets import DocumentationLinkViewSet, SnakeNameViewSet # http://www.django-rest-framework.org/api-guide/routers/#simplerouter bot_router = SimpleRouter(trailing_slash=False) +bot_router.register(r'documentation-links', DocumentationLinkViewSet) bot_router.register(r'snake-names', SnakeNameViewSet, base_name='snakename') + app_name = 'api' urlpatterns = ( # Build URLs using something like... -- cgit v1.2.3