2018-07-12 16:31:50 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
#
|
|
|
|
|
2018-11-02 06:38:44 +00:00
|
|
|
from django.urls import path
|
2018-07-25 03:21:12 +00:00
|
|
|
from rest_framework.routers import DefaultRouter
|
|
|
|
from .. import api
|
|
|
|
|
2018-07-12 16:31:50 +00:00
|
|
|
|
|
|
|
app_name = 'orgs'
|
2018-07-25 03:21:12 +00:00
|
|
|
router = DefaultRouter()
|
2018-11-02 06:38:44 +00:00
|
|
|
|
2019-01-15 11:01:33 +00:00
|
|
|
# 将会删除
|
2018-11-02 06:38:44 +00:00
|
|
|
router.register(r'org/(?P<org_id>[0-9a-zA-Z\-]{36})/membership/admins',
|
|
|
|
api.OrgMembershipAdminsViewSet, 'membership-admins')
|
|
|
|
router.register(r'org/(?P<org_id>[0-9a-zA-Z\-]{36})/membership/users',
|
|
|
|
api.OrgMembershipUsersViewSet, 'membership-users'),
|
2019-01-15 11:01:33 +00:00
|
|
|
# 替换为这个
|
|
|
|
router.register(r'orgs/(?P<org_id>[0-9a-zA-Z\-]{36})/membership/admins',
|
|
|
|
api.OrgMembershipAdminsViewSet, 'membership-admins-2')
|
|
|
|
router.register(r'orgs/(?P<org_id>[0-9a-zA-Z\-]{36})/membership/users',
|
|
|
|
api.OrgMembershipUsersViewSet, 'membership-users-2'),
|
2018-11-02 06:38:44 +00:00
|
|
|
|
2018-07-25 03:21:12 +00:00
|
|
|
router.register(r'orgs', api.OrgViewSet, 'org')
|
|
|
|
|
2018-07-12 16:31:50 +00:00
|
|
|
|
|
|
|
urlpatterns = [
|
2018-07-25 03:21:12 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
urlpatterns += router.urls
|