2022-08-21 11:25:44 +00:00
|
|
|
from django.urls import path, re_path
|
2022-08-26 02:02:16 +00:00
|
|
|
from frog_api.views import data, structure
|
2022-08-19 10:35:05 +00:00
|
|
|
|
|
|
|
urlpatterns = [
|
2022-08-26 02:02:16 +00:00
|
|
|
# structure (/project)
|
2022-09-22 20:40:44 +00:00
|
|
|
re_path(
|
|
|
|
"projects/(?P<project_slug>.+)/(?P<version_slug>.+)/(?P<category_slug>.+)/$",
|
|
|
|
structure.CategoryStructureView.as_view(),
|
|
|
|
name="category-structure",
|
|
|
|
),
|
2022-08-25 06:26:27 +00:00
|
|
|
re_path(
|
2022-08-26 02:02:16 +00:00
|
|
|
"projects/(?P<project_slug>.+)/(?P<version_slug>.+)/$",
|
2022-08-28 13:59:52 +00:00
|
|
|
structure.VersionStructureView.as_view(),
|
|
|
|
name="version-structure",
|
|
|
|
),
|
|
|
|
re_path(
|
|
|
|
"projects/(?P<project_slug>.+)/$",
|
|
|
|
structure.ProjectStructureView.as_view(),
|
|
|
|
name="project-structure",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"projects/",
|
|
|
|
structure.RootStructureView.as_view(),
|
|
|
|
name="root-structure",
|
2022-08-25 06:26:27 +00:00
|
|
|
),
|
2022-08-26 02:02:16 +00:00
|
|
|
# data (/data)
|
2022-08-24 01:58:55 +00:00
|
|
|
re_path(
|
2022-08-26 02:02:16 +00:00
|
|
|
"data/(?P<project_slug>.+)/(?P<version_slug>.+)/(?P<category_slug>.+)/$",
|
|
|
|
data.CategoryDataView.as_view(),
|
2022-08-28 13:59:52 +00:00
|
|
|
name="category-data",
|
2022-08-24 01:58:55 +00:00
|
|
|
),
|
2022-08-22 08:54:38 +00:00
|
|
|
re_path(
|
2022-08-26 02:02:16 +00:00
|
|
|
"data/(?P<project_slug>.+)/(?P<version_slug>.+)/$",
|
|
|
|
data.VersionDataView.as_view(),
|
2022-08-27 12:28:16 +00:00
|
|
|
name="version-data",
|
2022-08-21 11:25:44 +00:00
|
|
|
),
|
|
|
|
re_path(
|
2022-08-26 02:02:16 +00:00
|
|
|
"data/(?P<project_slug>.+)/$",
|
|
|
|
data.ProjectDataView.as_view(),
|
2022-08-28 13:59:52 +00:00
|
|
|
name="project-data",
|
2022-08-21 11:25:44 +00:00
|
|
|
),
|
2022-08-22 08:54:38 +00:00
|
|
|
path(
|
|
|
|
"data/",
|
2022-08-26 02:02:16 +00:00
|
|
|
data.RootDataView.as_view(),
|
2022-08-28 13:59:52 +00:00
|
|
|
name="root-data",
|
2022-08-22 08:54:38 +00:00
|
|
|
),
|
2022-08-19 10:35:05 +00:00
|
|
|
]
|