cmsmanage/tasks/urls.py

20 lines
529 B
Python

from django.shortcuts import redirect
from django.urls import path
from . import views
app_name = "tasks"
urlpatterns = [
path("", views.index, name="index"),
# ex: /CMS00001/
path("<str:tool_slug>/", views.toolDetail, name="toolDetail"),
# ex: /CMS00001/tasks/
path(
"<str:tool_slug>/tasks/",
lambda request, tool_slug: redirect("toolDetail", tool_slug),
),
# ex: /CMS00001/tasks/task_name/
path("<str:tool_slug>/tasks/<str:task_slug>", views.taskDetail, name="taskDetail"),
]