Advertisement
BondokBE

posts/urls.py

Feb 10th, 2019
424
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.53 KB | None | 0 0
  1. from django.urls import path
  2. from . import views
  3.  
  4. app_name = 'posts'  # this is the namespace of the app
  5.  
  6. urlpatterns = [
  7.     path('', views.post_list, name='base'),
  8.     path('post/<slug:slug>/', views.post_details, name='post'),
  9.     path('post_create/', views.post_create, name='post_create'),
  10.     path('edit/<slug:slug>/', views.post_edit, name='edit'),
  11.     path('delete/<slug:slug>/', views.post_delete, name='delete'),
  12.     path('about', views.about, name='about'),
  13.     path('contact', views.contact, name='contact')
  14. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement