Advertisement
matacoder

Untitled

Sep 5th, 2020
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.04 KB | None | 0 0
  1. from django.urls import path
  2.  
  3. from . import views
  4.  
  5. urlpatterns = [
  6.     path("", views.index, name="index"),
  7.     path("group/<slug:slug>/", views.group_posts, name="group_url"),
  8.     path("new/", views.new_post, name="new_post"),
  9.     path("404/", views.page_not_found, name="e404"),
  10.     path("500/", views.server_error, name="e500"),
  11.     path("follow/", views.follow_index, name="follow_index"),
  12.     path(
  13.         "<str:username>/<int:post_id>/comment",
  14.         views.add_comment,
  15.         name="add_comment"
  16.     ),
  17.     path("<str:username>/", views.profile, name="profile"),
  18.     path(
  19.         "<str:username>/<int:post_id>/",
  20.         views.post_view,
  21.         name="post_single"
  22.     ),
  23.     path(
  24.         "<str:username>/<int:post_id>/edit/",
  25.         views.post_edit,
  26.         name="post_edit"
  27.     ),
  28.     path(
  29.         "<str:username>/follow/",
  30.         views.profile_follow,
  31.         name="profile_follow"
  32.     ),
  33.     path(
  34.         "<str:username>/unfollow/",
  35.         views.profile_unfollow,
  36.         name="profile_unfollow"
  37.     ),
  38. ]
  39.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement