/
urls.py
executable file
·52 lines (49 loc) · 1.7 KB
/
urls.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
from django.conf.urls import url
from django.urls import path
from webapp.apps.comp.views import (
ModelPageView,
NewSimView,
EditSimView,
OutputsDownloadView,
OutputsView,
InputsAPIView,
CreateAPIView,
DetailAPIView,
RemoteDetailAPIView,
ForkDetailAPIView,
MyInputsAPIView,
DetailMyInputsAPIView,
NewSimulationAPIView,
)
# API Routes:
# api/v1/ - create sims.
# api/v1/inputs/ - view inputs, post meta parameters.
# api/v1/<int:model_pk>/edit/ - view inputs from sim using model_pk.
# api/v1/<int:model_pk>/ - get all data related to sim, including inputs and outputs.
urlpatterns = [
path("", ModelPageView.as_view(), name="app"),
path("new/", NewSimView.as_view(), name="simulation"),
path("api/v1/", CreateAPIView.as_view(), name="create_api"),
path("api/v1/inputs/", InputsAPIView.as_view(), name="inputs_api"),
path("api/v1/new/", NewSimulationAPIView.as_view(), name="inputs_api"),
path("api/v1/<int:model_pk>/", DetailAPIView.as_view(), name="detail_api"),
path(
"api/v1/<int:model_pk>/edit/",
DetailMyInputsAPIView.as_view(),
name="detail_myinputs_api_model_pk",
),
path(
"api/v1/<int:model_pk>/remote/",
RemoteDetailAPIView.as_view(),
name="remote_detail_api",
),
path(
"api/v1/<int:model_pk>/fork/",
ForkDetailAPIView.as_view(),
name="fork_detail_api",
),
path("<int:model_pk>/edit/", EditSimView.as_view(), name="edit"),
path("<int:model_pk>/download/", OutputsDownloadView.as_view(), name="download"),
path("<int:model_pk>/", EditSimView.as_view(), name="outputs"),
path("<int:model_pk>/v0/", OutputsView.as_view(), name="v0_outputs"),
]