2018-07-12 16:31:50 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
#
|
|
|
|
|
2020-05-06 07:31:08 +00:00
|
|
|
from django.urls import re_path, path
|
2018-07-25 03:21:12 +00:00
|
|
|
from rest_framework.routers import DefaultRouter
|
2019-08-21 12:27:21 +00:00
|
|
|
|
|
|
|
from common import api as capi
|
2018-07-25 03:21:12 +00:00
|
|
|
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
|
|
|
|
2018-07-25 03:21:12 +00:00
|
|
|
router.register(r'orgs', api.OrgViewSet, 'org')
|
|
|
|
|
2019-08-21 12:27:21 +00:00
|
|
|
old_version_urlpatterns = [
|
|
|
|
re_path('(?P<resource>org)/.*', capi.redirect_plural_name_api)
|
|
|
|
]
|
2018-07-12 16:31:50 +00:00
|
|
|
|
|
|
|
urlpatterns = [
|
2020-05-06 07:31:08 +00:00
|
|
|
path('<uuid:pk>/users/all/', api.OrgAllUserListApi.as_view(), name='org-all-users'),
|
2018-07-25 03:21:12 +00:00
|
|
|
]
|
|
|
|
|
2019-08-21 12:27:21 +00:00
|
|
|
urlpatterns += router.urls + old_version_urlpatterns
|