from django.urls import include, path
from django.contrib.staticfiles.urls import staticfiles_urlpatterns

from django.contrib import admin
admin.autodiscover()

from . import views

app_name = 'ats'

urlpatterns = [
    path('', views.index),
    path('error_internal/', views.errorinternal, name='error_internal'),
    path('top/', views.top),
    path('login/', views.login_view),
    path('logout/', views.logout_view),
    path('regist/', views.regist),
    #
    # path('summary/', views.summary),
    path('summary/project/', views.summary_p),
    path('summary/job/', views.summary_j),
    path('summary/user/', views.summary_u),
    #
    # direct link
    #
    # path('summary/(?P<project_id>\d+)/', views.summary_p),
    # path('summary/(?P<project_id>\d+)/(?P<from_date>\d+)_(?P<to_date>\d+)/', vi ews.summary_pd),
    # path('summary/(?P<project_id>\d+)/(?P<from_date>\d+)_(?P<to_date>\d+)/u(?P<user_id>\d+)/', views.summary_pdu),
    # path('summary/(?P<project_id>\d+)/(?P<from_date>\d+)_(?P<to_date>\d+)/j(?P<job_id>\d+)/, views.summary_pdj),
    #
    path('query/', views.query),
    #
    # path('api/', views.api),
    #
    path('manage/', views.manage),
    #
    path('manage/chpasswd/', views.manage_chpasswd),
    # path('manage/user/', views.manage_user_list),
    # path('manage/user/(?P<user_id>\d+)/', views.manage_user_detail),
    # path('manage/project/', views.manage_project_list),
    # path('manage/project/(?P<project_id>\d+)/', views.manage_project_detail),
    # path('manage/task/', views.manage_task_list),
    # path('manage/task/(?P<task_id>\d+)/', views.manage_task_detail),
    # path('manage/job/', views.manage_job_list),
    # path('manage/job/(?P<job_id>\d+)/', views.manage_job_detail),
]

urlpatterns += staticfiles_urlpatterns()

@@ -234,16 +234,30 @@
 ws.index
+, name='index'
 ),%0A    p
@@ -350,16 +350,28 @@
 iews.top
+, name='top'
 ),%0A    p
@@ -396,24 +396,43 @@
 s.login_view
+, name='login_view'
 ),%0A    path(
@@ -459,16 +459,36 @@
 out_view
+, name='logout_view'
 ),%0A    p
@@ -514,16 +514,31 @@
 s.regist
+, name='regist'
 ),%0A    #
@@ -574,16 +574,32 @@
 .summary
+, name='summary'
 ),%0A    p
@@ -633,24 +633,42 @@
 ws.summary_p
+, name='summary_p'
 ),%0A    path(
@@ -698,16 +698,34 @@
 ummary_j
+, name='summary_j'
 ),%0A    p
@@ -760,16 +760,34 @@
 ummary_u
+, name='summary_u'
 ),%0A    #
@@ -1239,16 +1239,30 @@
 ws.query
+, name='query'
 ),%0A    #
@@ -1331,16 +1331,31 @@
 s.manage
+, name='manage'
 ),%0A    #
@@ -1405,16 +1405,40 @@
 chpasswd
+, name='manage_chpasswd'
 ),%0A    #
@@ -1477,24 +1477,49 @@
 ge_user_list
+, name='manage_user_list'
 ),%0A    # pat
@@ -1573,24 +1573,51 @@
 _user_detail
+, name='manage_user_detail'
 ),%0A    # pat
@@ -1658,24 +1658,52 @@
 project_list
+, name='manage_project_list'
 ),%0A    # pat
@@ -1766,24 +1766,54 @@
 oject_detail
+, name='manage_project_detail'
 ),%0A    # pat
@@ -1848,24 +1848,49 @@
 ge_task_list
+, name='manage_task_list'
 ),%0A    # pat
@@ -1948,16 +1948,43 @@
 k_detail
+, name='manage_task_detail'
 ),%0A    #
@@ -2025,16 +2025,40 @@
 job_list
+, name='manage_job_list'
 ),%0A    #
@@ -2117,16 +2117,42 @@
 b_detail
+, name='manage_job_detail'
 ),%0A%5D%0A%0Aur

add reverse name.