2018-07-12 16:31:50 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
#
|
|
|
|
|
2021-03-02 06:57:48 +00:00
|
|
|
from django.urls import path
|
2020-08-03 08:17:46 +00:00
|
|
|
from rest_framework_bulk.routes import BulkRouter
|
2019-08-21 12:27:21 +00:00
|
|
|
|
2018-07-25 03:21:12 +00:00
|
|
|
from .. import api
|
|
|
|
|
2018-07-12 16:31:50 +00:00
|
|
|
|
|
|
|
app_name = 'orgs'
|
2021-03-02 06:57:48 +00:00
|
|
|
router = BulkRouter()
|
2018-11-02 06:38:44 +00:00
|
|
|
|
2018-07-25 03:21:12 +00:00
|
|
|
router.register(r'orgs', api.OrgViewSet, 'org')
|
2021-03-02 06:57:48 +00:00
|
|
|
router.register(r'org-member-relation', api.OrgMemberRelationBulkViewSet, 'org-member-relation')
|
2018-07-25 03:21:12 +00:00
|
|
|
|
2020-11-06 02:46:04 +00:00
|
|
|
router.register(r'orgs/(?P<org_id>[0-9a-zA-Z\-]{36})/membership/admins',
|
|
|
|
api.OrgMemberAdminRelationBulkViewSet, 'membership-admins')
|
|
|
|
router.register(r'orgs/(?P<org_id>[0-9a-zA-Z\-]{36})/membership/users',
|
|
|
|
api.OrgMemberUserRelationBulkViewSet, 'membership-users'),
|
|
|
|
|
2021-03-02 06:57:48 +00:00
|
|
|
|
|
|
|
urlpatterns = [
|
|
|
|
path('orgs/current/', api.CurrentOrgDetailApi.as_view(), name='current-org-detail'),
|
2019-08-21 12:27:21 +00:00
|
|
|
]
|
2018-07-12 16:31:50 +00:00
|
|
|
|
2021-03-02 06:57:48 +00:00
|
|
|
urlpatterns += router.urls
|