urls.py 463 B

123456789101112131415161718
  1. from django.urls import include, path
  2. from rest_framework_nested import routers
  3. from glitchtip.routers import BulkSimpleRouter
  4. from .views import OrganizationViewSet
  5. router = BulkSimpleRouter()
  6. router.register(r"organizations", OrganizationViewSet)
  7. organizations_router = routers.NestedSimpleRouter(
  8. router, r"organizations", lookup="organization"
  9. )
  10. urlpatterns = [
  11. path("", include(router.urls)),
  12. path("", include(organizations_router.urls)),
  13. ]