You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.5 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. from django.urls import include, path
  2. from .views import comment, example, example_state, health, project, tag, task
  3. urlpatterns_project = [
  4. path(
  5. route='examples',
  6. view=example.ExampleList.as_view(),
  7. name='example_list'
  8. ),
  9. path(
  10. route='examples/<int:example_id>',
  11. view=example.ExampleDetail.as_view(),
  12. name='example_detail'
  13. ),
  14. path(
  15. route='tags',
  16. view=tag.TagList.as_view(),
  17. name='tag_list'
  18. ),
  19. path(
  20. route='tags/<int:tag_id>',
  21. view=tag.TagDetail.as_view(),
  22. name='tag_detail'
  23. ),
  24. path(
  25. route='comments',
  26. view=comment.CommentList.as_view(),
  27. name='comment_list'
  28. ),
  29. path(
  30. route='comments/<int:comment_id>',
  31. view=comment.CommentDetail.as_view(),
  32. name='comment_detail'
  33. ),
  34. path(
  35. route='examples/<int:example_id>/states',
  36. view=example_state.ExampleStateList.as_view(),
  37. name='example_state_list'
  38. ),
  39. ]
  40. urlpatterns = [
  41. path(
  42. route='health',
  43. view=health.Health.as_view(),
  44. name='health'
  45. ),
  46. path(
  47. route='projects',
  48. view=project.ProjectList.as_view(),
  49. name='project_list'
  50. ),
  51. path(
  52. route='tasks/status/<task_id>',
  53. view=task.TaskStatus.as_view(),
  54. name='task_status'
  55. ),
  56. path(
  57. route='projects/<int:project_id>',
  58. view=project.ProjectDetail.as_view(),
  59. name='project_detail'
  60. ),
  61. path('projects/<int:project_id>/', include(urlpatterns_project))
  62. ]