2020-12-03 12:31:39 -05:00
|
|
|
from django.shortcuts import redirect
|
|
|
|
from django.urls import path
|
|
|
|
|
|
|
|
from . import views
|
|
|
|
|
2022-01-25 00:00:58 -05:00
|
|
|
app_name = "tasks"
|
|
|
|
|
2020-12-03 12:31:39 -05:00
|
|
|
urlpatterns = [
|
2022-01-24 23:37:04 -05:00
|
|
|
path("", views.index, name="index"),
|
2020-12-03 12:31:39 -05:00
|
|
|
# ex: /CMS00001/
|
2022-01-24 23:37:04 -05:00
|
|
|
path("<str:tool_slug>/", views.toolDetail, name="toolDetail"),
|
2020-12-03 12:31:39 -05:00
|
|
|
# ex: /CMS00001/tasks/
|
2022-01-24 23:37:04 -05:00
|
|
|
path(
|
|
|
|
"<str:tool_slug>/tasks/",
|
|
|
|
lambda request, tool_slug: redirect("toolDetail", tool_slug),
|
|
|
|
),
|
2020-12-03 12:31:39 -05:00
|
|
|
# ex: /CMS00001/tasks/task_name/
|
2022-01-24 23:37:04 -05:00
|
|
|
path("<str:tool_slug>/tasks/<str:task_slug>", views.taskDetail, name="taskDetail"),
|
2020-12-03 12:31:39 -05:00
|
|
|
]
|