cmsmanage/tasks/urls.py
Adam Goldsmith 9ec48f075f Initial Commit
basic web-app functionality works
2020-12-03 12:31:39 -05:00

15 lines
486 B
Python

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