You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Django/comments-jrx/urls.py

13 lines
369 B

This file contains ambiguous Unicode characters!

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.

from django.urls import path
from . import views
#jrx: 应用命名空间
app_name = "comments"
#jrx: 评论相关URL配置
urlpatterns = [
path(
'article/<int:article_id>/postcomment', #jrx: 接收文章ID参数
views.CommentPostView.as_view(), #jrx: 关联评论提交视图
name='postcomment'), #jrx: URL名称用于反向解析
]