Skip to content

Instantly share code, notes, and snippets.

@aliceridgway
Created Jun 25, 2022
Embed
What would you like to do?
from django.urls import path
from . import views
urlpatterns = [
path("", views.index, name="index"),
path("add", views.add_post, name="add_post"),
path("<slug:slug>", views.post_detail, name="post_detail"),
path("<slug:slug>/publish", views.publish, name="publish"),
path("<slug:slug>/edit", views.edit_post, name="edit"),
path("<slug:slug>/delete", views.delete_post, name="delete"),
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment