aboutsummaryrefslogtreecommitdiffstats
path: root/api/urls.py
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2018-09-23 15:21:42 +0200
committerGravatar Johannes Christ <[email protected]>2018-09-23 15:21:42 +0200
commit4fbbf9c2a8b30862bfaab1dddf4e860431bf6046 (patch)
tree42fa33c0a6b22794d20a2424785803c02c4e391b /api/urls.py
parentRevert "Add the `Tag` model." (diff)
parentAdd API root view documentation. (diff)
Merge branch 'django+add-tag-api' into django
Diffstat (limited to 'api/urls.py')
-rw-r--r--api/urls.py14
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 = (