urls.py 665 B

1234567891011121314151617
  1. from django.urls import include, path
  2. from rest_framework_nested import routers
  3. from glitchtip.routers import BulkSimpleRouter
  4. from organizations_ext.views import OrganizationMemberViewSet
  5. from projects.views import TeamProjectViewSet
  6. from .views import TeamViewSet
  7. router = BulkSimpleRouter()
  8. router.register(r"teams", TeamViewSet)
  9. teams_router = routers.NestedSimpleRouter(router, r"teams", lookup="team")
  10. teams_router.register(r"projects", TeamProjectViewSet, basename="team-projects")
  11. teams_router.register(r"members", OrganizationMemberViewSet, basename="team-members")
  12. urlpatterns = [path("", include(router.urls)), path("", include(teams_router.urls))]