Skip to content

Commit d2e96a3

Browse files
committed
Merge pull request #292 from helgi/routers
ref(router): use the built in router of Django
2 parents f09b55e + 012b570 commit d2e96a3

2 files changed

Lines changed: 4 additions & 51 deletions

File tree

rootfs/api/routers.py

Lines changed: 0 additions & 48 deletions
This file was deleted.

rootfs/api/urls.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@
55

66
from django.conf import settings
77
from django.conf.urls import include, url
8-
9-
from api import routers, views
108
from rest_framework.authtoken.views import obtain_auth_token as views_obtain_auth_token
9+
from rest_framework.routers import DefaultRouter
10+
11+
from api import views
1112

1213

13-
router = routers.ApiRouter()
14+
router = DefaultRouter(trailing_slash=False)
1415

1516
# Add the generated REST URLs and login/logout endpoint
1617
urlpatterns = [

0 commit comments

Comments
 (0)