diff --git a/apps/api/activity/urls.py b/apps/api/activity/urls.py index ca0fab43..56665730 100644 --- a/apps/api/activity/urls.py +++ b/apps/api/activity/urls.py @@ -9,6 +9,6 @@ def register_activity_urls(router, path): """ Configure router for Activity REST API. """ - router.register(path + r'activity', ActivityViewSet) - router.register(path + r'type', ActivityTypeViewSet) - router.register(path + r'guest', GuestViewSet) + router.register(path + '/activity', ActivityViewSet) + router.register(path + '/type', ActivityTypeViewSet) + router.register(path + '/guest', GuestViewSet) diff --git a/apps/api/members/urls.py b/apps/api/members/urls.py index ffce1cbd..f60465c0 100644 --- a/apps/api/members/urls.py +++ b/apps/api/members/urls.py @@ -9,7 +9,7 @@ def register_members_urls(router, path): """ Configure router for Member REST API. """ - router.register(path + r'profile', ProfileViewSet) - router.register(path + r'club', ClubViewSet) - router.register(path + r'role', RoleViewSet) - router.register(path + r'membership', MembershipViewSet) + router.register(path + '/profile', ProfileViewSet) + router.register(path + '/club', ClubViewSet) + router.register(path + '/role', RoleViewSet) + router.register(path + '/membership', MembershipViewSet) diff --git a/apps/api/note/urls.py b/apps/api/note/urls.py index da12760d..2bc56aa6 100644 --- a/apps/api/note/urls.py +++ b/apps/api/note/urls.py @@ -10,11 +10,8 @@ def register_note_urls(router, path): """ Configure router for Note REST API. """ - router.register(path + r'note', NotePolymorphicViewSet) - router.register(path + r'club', NoteClubViewSet) - router.register(path + r'user', NoteUserViewSet) - router.register(path + r'special', NoteSpecialViewSet) + router.register(path + '', NotePolymorphicViewSet) - router.register(path + r'transaction/transaction', TransactionViewSet) - router.register(path + r'transaction/template', TransactionTemplateViewSet) - router.register(path + r'transaction/membership', MembershipTransactionViewSet) + router.register(path + '/transaction/transaction', TransactionViewSet) + router.register(path + '/transaction/template', TransactionTemplateViewSet) + router.register(path + '/transaction/membership', MembershipTransactionViewSet) diff --git a/apps/api/urls.py b/apps/api/urls.py index d272fc8d..03db1382 100644 --- a/apps/api/urls.py +++ b/apps/api/urls.py @@ -32,13 +32,13 @@ router = routers.DefaultRouter() router.register(r'users', UserViewSet) # Routers for members app -register_members_urls(router, r'members/') +register_members_urls(router, r'members') # Routers for activity app -register_activity_urls(router, r'activity/') +register_activity_urls(router, r'activity') # Routers for note app -register_note_urls(router, r'note/') +register_note_urls(router, r'note') # Wire up our API using automatic URL routing. # Additionally, we include login URLs for the browsable API.