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.
DjangoBlog/servermanager/urls.py

18 lines
683 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.

# 马莹导入Django的路径配置模块
from django.urls import path
# 马莹导入微信机器人框架适配Django的视图生成工具
from werobot.contrib.django import make_view
# 马莹:导入当前应用中定义的微信机器人实例
from .robot import robot
# 马莹定义应用的命名空间用于URL反向解析时区分不同应用的URL
app_name = "servermanager"
# 马莹URL路由配置列表
urlpatterns = [
# 马莹配置微信机器人的访问路径将机器人实例转换为Django可识别的视图
# 马莹:当访问 /servermanager/robot 路径时,由微信机器人处理请求
path(r'robot', make_view(robot)),
]