frogress/frog_api/urls.py

43 lines
1.1 KiB
Python
Raw Normal View History

2022-08-21 11:25:44 +00:00
from django.urls import path, re_path
from frog_api.views import data, structure
2022-08-19 10:35:05 +00:00
urlpatterns = [
# structure (/project)
re_path(
"projects/(?P<project_slug>.+)/(?P<version_slug>.+)/$",
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",
),
# data (/data)
2022-08-24 01:58:55 +00:00
re_path(
"data/(?P<project_slug>.+)/(?P<version_slug>.+)/(?P<category_slug>.+)/$",
data.CategoryDataView.as_view(),
name="category-data",
2022-08-24 01:58:55 +00:00
),
2022-08-22 08:54:38 +00:00
re_path(
"data/(?P<project_slug>.+)/(?P<version_slug>.+)/$",
data.VersionDataView.as_view(),
name="version-data",
2022-08-21 11:25:44 +00:00
),
re_path(
"data/(?P<project_slug>.+)/$",
data.ProjectDataView.as_view(),
name="project-data",
2022-08-21 11:25:44 +00:00
),
2022-08-22 08:54:38 +00:00
path(
"data/",
data.RootDataView.as_view(),
name="root-data",
2022-08-22 08:54:38 +00:00
),
2022-08-19 10:35:05 +00:00
]