Ultron/ultron/followup/urls.py

96 lines
2.7 KiB
Python

from django.urls import path, re_path
from ultron.followup.models import MindState
from . import views
# Chronos
chrono_urlpatterns = [
path(r"", views.chrono_listing, name="chrono_list"),
path(r"create/", views.chrono_create_or_update, name="chrono_create"),
path(
r"create/<int:gymnastid>/",
views.chrono_create_or_update,
name="chrono_create_for_gymnast",
),
path(r"edit/<int:chronoid>/", views.chrono_create_or_update, name="chrono_update"),
]
# Learned Skill
learnedskill_urlpatterns = [
path(r"create/", views.learnedskill_create_or_update, name="learnedskill_create"),
path(
r"create/<int:gymnastid>/",
views.learnedskill_create_or_update,
name="learnedskill_create",
),
path(r"new/", views.gymnast_learn_skill),
]
# Score
score_urlpatterns = [
path(
r"add/<int:gymnastid>",
views.score_create_or_update,
name="score_create_for_gymnast",
),
path(r"add", views.score_create_or_update, name="score_create"),
path(r"edit/<int:scoreid>", views.score_create_or_update, name="score_update"),
path(r"", views.score_listing),
]
# Accident
accident_urlpatterns = [
path(r"search/", views.accident_listing),
path(r"", views.accident_listing, name="accident_list"),
path(r"add/", views.accident_create_or_update, name="accident_create"),
path(
r"add/<int:gymnastid>",
views.accident_create_or_update,
name="accident_create_for_gymnast",
),
path(
r"edit/<int:accidentid>/",
views.accident_create_or_update,
name="accident_update",
),
path(r"<int:accidentid>/", views.accident_detail, name="accident_details"),
]
# Minstate
mindstate_urlpatterns = [
path(r"", views.mindstate_listing, name="mindstate_list"),
path(
r"gymnast/<int:gymnastid>/",
views.mindstate_listing,
name="gymnast_mindstate_list",
),
path(r"add/", views.mindstate_create_or_update, name="mindstate_create"),
path(
r"add/<int:gymnastid>",
views.mindstate_create_or_update,
name="mindstate_create_for_gymnast",
),
path(
r"edit/<int:mindstateid>/",
views.mindstate_create_or_update,
name="mindstate_update",
),
path(r"<int:mindstateid>/", views.mindstate_detail, name="mindstate_details"),
]
# Height & Weight
heightweight_urlpatterns = [
path(r"add/", views.heightweight_create_or_update, name="heightweight_create"),
path(
r"add/<int:gymnastid>",
views.heightweight_create_or_update,
name="heightweight_create_for_gymnast",
),
path(
r"edit/<int:heightweightid>/",
views.heightweight_create_or_update,
name="heightweight_update",
),
]