from django.urls import path
from . import views

urlpatterns = [
    # 首页
    path('', views.index, name='index'),

    # 作品详情页
    path('gallery/<slug:slug>/', views.ArtworkDetailView.as_view(), name='artwork_detail'),

    # 关于页面
    path('about/', views.about, name='about'),

    # 搜索页面
    path('search/', views.search, name='search'),

    # 分类页面
    path('category/<slug:slug>/', views.category_view, name='category'),

    # 用户认证
    path('login/', views.login_view, name='login'),
    path('logout/', views.logout_view, name='logout'),

    # 评论功能
    path('artwork/<slug:artwork_slug>/comment/add/', views.add_comment, name='add_comment'),
    path('comment/<int:pk>/delete/', views.delete_comment, name='delete_comment'),
]