cmsmanage/tasks/urls.py

20 lines
529 B
Python
Raw Normal View History

from django.shortcuts import redirect
from django.urls import path
from . import views
2022-01-25 00:00:58 -05:00
app_name = "tasks"
urlpatterns = [
2022-01-24 23:37:04 -05:00
path("", views.index, name="index"),
# ex: /CMS00001/
2022-01-24 23:37:04 -05:00
path("<str:tool_slug>/", views.toolDetail, name="toolDetail"),
# ex: /CMS00001/tasks/
2022-01-24 23:37:04 -05:00
path(
"<str:tool_slug>/tasks/",
lambda request, tool_slug: redirect("toolDetail", tool_slug),
),
# 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"),
]