heljhumenad
2/19/2020 - 3:18 AM

Django URL Construct

Django url constructs for any uri that you can initialize

from django.urls import path

from eval.app.views import employee

app_name = 'employee'

urlpatterns = [

    path('',
         employee.EmployeeIndexView.as_view(),
         name='employee_index'
         ),

    path('add-emp/',
         employee.EmployeeCreateView.as_view(),
         name='employee_add'
         ),

    path('update/<int:pk>/change/',
         employee.EmployeeUpdateView.as_view(),
         name='employee_update'
         ),

    path('delete/<int:pk>/',
         employee.EmployeeDeleteView.as_view(),
         name='employee_delete'
         ),
    path('read/<int:pk>/',
         employee.EmployeeDetailView.as_view(),
         name='employee_read'
         )
]