urls.py 301 B

12345678910111213
  1. from django.conf.urls import url
  2. from rest_framework_bulk.routes import BulkRouter
  3. from treeAndTable.views import DepartmentView, DeptAndJobView
  4. router = BulkRouter()
  5. router.register(r'job', DeptAndJobView)
  6. urlpatterns = router.urls
  7. urlpatterns += [
  8. url(r'^dept/', DepartmentView.as_view())
  9. ]