diff options
author | 2018-09-23 15:21:42 +0200 | |
---|---|---|
committer | 2018-09-23 15:21:42 +0200 | |
commit | 4fbbf9c2a8b30862bfaab1dddf4e860431bf6046 (patch) | |
tree | 42fa33c0a6b22794d20a2424785803c02c4e391b /api/urls.py | |
parent | Revert "Add the `Tag` model." (diff) | |
parent | Add API root view documentation. (diff) |
Merge branch 'django+add-tag-api' into django
Diffstat (limited to 'api/urls.py')
-rw-r--r-- | api/urls.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/api/urls.py b/api/urls.py index f4ed641c..1648471c 100644 --- a/api/urls.py +++ b/api/urls.py @@ -1,15 +1,16 @@ from django.urls import include, path -from rest_framework.routers import SimpleRouter +from rest_framework.routers import DefaultRouter from .views import HealthcheckView from .viewsets import ( DocumentationLinkViewSet, MemberViewSet, - OffTopicChannelNameViewSet, SnakeNameViewSet + OffTopicChannelNameViewSet, SnakeNameViewSet, + TagViewSet ) -# http://www.django-rest-framework.org/api-guide/routers/#simplerouter -bot_router = SimpleRouter(trailing_slash=False) +# http://www.django-rest-framework.org/api-guide/routers/#defaultrouter +bot_router = DefaultRouter(trailing_slash=False) bot_router.register( 'documentation-links', DocumentationLinkViewSet @@ -28,7 +29,10 @@ bot_router.register( SnakeNameViewSet, base_name='snakename' ) - +bot_router.register( + 'tags', + TagViewSet, +) app_name = 'api' urlpatterns = ( |