from django.urls import path
from . import views
from users import views as user_views
from .views import PostListView,PostDeleteView, PostDetailView, PostCreateView,PostUpdateView,UserPostListView


urlpatterns = [
    path('', PostListView.as_view(),name='blog-home'),
    path('about/', views.about,name='blog-about'),
    path('register/',user_views.register,name='register'),
    path('post/<int:pk>/', PostDetailView.as_view(),name='post-detail'),
    path('post/new/', PostCreateView.as_view(),name='post-create'),
    path('post/<int:pk>/update/', PostUpdateView.as_view(),name='post-update'),
    path('post/<int:pk>/delete/', PostDeleteView.as_view(),name='post-delete'),
    path('user/<username>/posts/', UserPostListView.as_view(),name='user-posts'),

]
