from django.conf.urls import url from blog.views import ( AboutView, CreatePostView, DraftListView, PostDetailView, PostDeleteView, PostListView, PostUpdateView, ) urlpatterns = [ url(r"^$", PostListView.as_view(), name="post_list"), url(r"^about/$", AboutView.as_view(), name="about"), url(r"^post/(?P<pk>\d+)$", PostDetailView.as_view(), name="post_detail"), url(r"^post/new/$", CreatePostView.as_view(), name="post_new"), url(r"^post/(?P<pk>\d+)/edit/$", PostUpdateView.as_view(), name="post_edit"), url(r"^post/(?P<pk>\d+)/remove/$", PostDeleteView.as_view(), name="post_remove"), url(r"^drafts/$", DraftListView.as_view(), name="post_drafts_list"), ]
from blog.views import ( PostListView, PostDeleteView, PostDetailView, PostUpdateView, DraftListView, CreatePostView, comment_remove, post_publish, NewCuisineView, NewRestaurantView, ) # CommentFormView,add_comment_to_post,comment_approve,) # path('commentform/', CommentFormView.as_view(), name='comment_form'), # path('post/<int:pk>/comment',add_comment_to_post , name='add_comment_to_post'), # path('comment/<int:pk>/approve/',comment_approve, name='comment_approve'), urlpatterns = [ path('', PostListView.as_view(), name='post_list'), path('post/<int:pk>/', PostDetailView.as_view(), name='post_detail'), path('drafts/', DraftListView.as_view(), name='post_draft_list'), path('post/new/', CreatePostView.as_view(), name='post_new'), path('post/<int:pk>/edit/', PostUpdateView.as_view(), name='post_edit'), path('post/<int:pk>/remove/', PostDeleteView.as_view(), name='post_remove'), path('post/<int:pk>/publish/', post_publish, name='post_publish'), path('comment/<int:pk>/remove/', comment_remove, name='comment_remove'), path('newcuisine/', NewCuisineView.as_view(), name='new_cuisine'), path('newrestaurant/', NewRestaurantView.as_view(), name='new_restaurant'), ]
DraftListView, comment_approve, comment_remove, post_publish, add_comment_to_post, ) urlpatterns = [ path("", postListView.as_view(), name="post_list"), path("about/$", AboutView.as_view(), name="about"), path("posts/<int:pk>/$", postDetailView.as_view(), name="post_detail"), path("posts/new/$", CreatePostView.as_view(), name="post_new"), path("posts/<int:pk>/update$", PostUpdateView.as_view(), name="post_edit"), path("posts/<int:pk>/delete$", PostDeleteView.as_view(), name="post_remove"), path("draft/$", DraftListView.as_view(), name="post_draft_list"), path( "posts/<int:pk>/comment/$", views.add_comment_to_post, name="add_comment_to_post", ), path("comment/<int:pk>/approve/$", views.comment_approve, name="comment_approve"), path("comment/<int:pk>/remove/$", views.comment_remove, name="comment_remove"), path("post/<int:pk>/publish/$", views.post_publish, name="post_publish"), ]
from django.urls import path from django.conf.urls import url from blog import views from blog.views import(AboutView,PostListView,PostDetailView, CreatePostView,UpdatePostView,PostDeleteView,DraftListView, add_comment_to_post,comment_approve,comment_remove,post_publish) urlpatterns = [ path('',PostListView.as_view(),name="post_list"), path('about/',AboutView.as_view(),name="about"), url('post/(?P<pk>\d+)$',PostDetailView.as_view(),name="post_detail"), url('post/new/$',CreatePostView.as_view(),name="post_new"), url('post/(?P<pk>\d+)/edit/$',UpdatePostView.as_view(),name="post_edit"), url('post/(?P<pk>\d+)/remove/$',PostDeleteView.as_view(),name="post_remove"), url('drafts/',DraftListView.as_view(),name="post_draft_list"), url('post/(?P<pk>\d+)/comment/$',add_comment_to_post,name="add_comment_to_post"), url('comment/(?P<pk>\d+)/approve/$',comment_approve,name="comment_approve"), url('comment/(?P<pk>\d+)/remove/$',comment_remove,name="comment_remove"), url('post/(?P<pk>\d+)/publish/$',post_publish,name="post_publish"), ]
from django.conf.urls import url from blog.views import (AboutView, PostListView, PostDetailView, PostCreateView, PostUpdateView, PostDeleteView, DraftListView, add_comments_to_post, comment_approve, comment_remove, post_publish) urlpatterns = [ url(r'^$', PostListView.as_view(), name='post_list'), url(r'^about/$', AboutView.as_view(), name='about'), url(r'^post/(?P<pk>\d+)/$', PostDetailView.as_view(), name='post_detail'), url(r'^post/new/$', PostCreateView.as_view(), name='post_new'), url(r'^post/(?P<pk>\d+)/edit/$', PostUpdateView.as_view(), name='post_edit'), url(r'^post/(?P<pk>\d+)/delete/$', PostDeleteView.as_view(), name='post_remove'), url(r'^drafts/$', DraftListView.as_view(), name='post_draft_list'), url(r'^post/(?P<pk>\d+)/comment/$', add_comments_to_post, name='add_comment_to_post'), url(r'^comment/(?P<pk>\d+)/approve/$', comment_approve, name='comment_approve'), url(r'^comment/(?P<pk>\d+)/delete/$', comment_remove, name='comment_remove'), url(r'^post/(?P<pk>\d+)/publish/$', post_publish, name='post_publish'), ]
from django.urls import path from blog.views import (createUser,About_View,PostDetailView,add_comment_to_post,post_publish, PostListView,PostDetailView,CreatePostView,comment_approve, UpdatePostView,DeletePostView,DraftListView,comment_remove) app_name = 'blog' urlpatterns = [ path('signup/',createUser,name='signup'), path('',PostListView.as_view(),name='post_list'), path('post/<int:pk>',PostDetailView.as_view(),name='post_detail'), path('about/',About_View.as_view(),name='about'), path('post/new',CreatePostView.as_view(),name='post_view'), path('post/<int:pk>/edit',UpdatePostView.as_view(),name='post_edit'), path('post/<int:pk>/delete',DeletePostView.as_view(),name='post_delete'), path('drafts/',DraftListView.as_view(),name='drafts_list'), path('post/<int:pk>/comment/',add_comment_to_post,name='add_comment_to_post'), path('comments/<int:pk>/approve',comment_approve,name='comment_approve'), path('comments/<int:pk>/delete',comment_remove,name='comment_remove'), path('post/<int:pk>/publish',post_publish,name='post_publish'), ]