摘要: 规则 from django.urls import register_converter # 导入register_converter用来注册规则 class Year(object): regex = "\d{4}" # 正则规则,regex 变量是固定的 def to_python(self, 阅读全文
posted @ 2022-11-25 17:52 zhq9 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 创建项目 创建项目 diango-admin startproject my_project/项目名称 创建子应用 python3 manage.py startapp app01/子应用名称 目录结构 目录介绍 │─ manage.py # 终端脚本命令,提供了一系列用于生成文件或者目录的命令,也 阅读全文
posted @ 2022-11-25 09:19 zhq9 阅读(192) 评论(0) 推荐(0) 编辑