This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
# zy: 评论模块URL配置 - 定义评论相关的URL路由和视图映射
from django.urls import path
# zy: 导入评论视图模块,包含评论相关的视图类
from . import views
# zy: 定义应用命名空间 - 用于URL反向解析时避免命名冲突
app_name = "comments"
# zy: URL模式列表 - 定义评论模块的所有URL路由规则
urlpatterns = [
# zy: 发表评论URL路由 - 处理用户发表评论的请求
path(
'article/<int:article_id>/postcomment', # zy: URL模式,包含文章ID参数
views.CommentPostView.as_view(), # zy: 关联的基于类的视图
name='postcomment'), # zy: URL名称,用于反向解析
]