Guest User

Untitled

a guest
Sep 17th, 2019
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.44 KB | None | 0 0
  1. from django.urls import path,re_path,include
  2. from . import views
  3.  
  4. app_name = 'courses'
  5.  
  6. urlpatterns = [
  7.     re_path(r'^$', views.ListCourses.as_view(), name='list'),
  8.     path('new/', views.CreateCourse.as_view(), name='new'),
  9.     path('<int:pk>/', views.SingleCourse.as_view(), name='show'),
  10.     path('<int:pk>/edit/', views.UpdateCourse.as_view(), name='edit'),
  11.     path('<int:pk>/delete/', views.DeleteCourse.as_view(), name='delete'),
  12. ]
Advertisement
Add Comment
Please, Sign In to add comment