diff options
author | 2018-08-16 21:49:19 +0200 | |
---|---|---|
committer | 2018-08-16 21:49:19 +0200 | |
commit | c08f0761c5c49c666d22223ff18e1da5a6b73d37 (patch) | |
tree | 1078351e6ab286802b52a77998100ca0e03343ae /api/urls.py | |
parent | Add the `DocumentationLink` model. (diff) |
Add a simple `list` / `retrieve` documentation link endpoint.
Diffstat (limited to 'api/urls.py')
-rw-r--r-- | api/urls.py | 4 |
1 files changed, 3 insertions, 1 deletions
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... |