From 0c67b3e8b5df53318786fd95c440aa126e52d545 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=9A=82=E8=9A=81=E4=BA=91?= Date: Sun, 13 Sep 2026 22:47:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DjangoAdmin_Django_AntdVue/zh/introduction.md | 6 +++--- DjangoAdmin_Django_AntdVue/zh/volume7/git.md | 2 +- DjangoAdmin_Django_EleVue/zh/introduction.md | 6 +++--- DjangoAdmin_Django_EleVue/zh/volume7/git.md | 2 +- DjangoAdmin_Django_NaiveVue/zh/introduction.md | 6 +++--- DjangoAdmin_Django_NaiveVue/zh/volume7/git.md | 2 +- DjangoAdmin_FastAPI_AntdVue/zh/volume5/templates.md | 10 +++++----- DjangoAdmin_FastAPI_AntdVue/zh/volume7/git.md | 2 +- DjangoAdmin_FastAPI_EleVue/zh/introduction.md | 6 +++--- DjangoAdmin_FastAPI_EleVue/zh/volume5/templates.md | 10 +++++----- DjangoAdmin_FastAPI_EleVue/zh/volume7/git.md | 2 +- DjangoAdmin_FastAPI_NaiveVue/zh/volume5/templates.md | 10 +++++----- DjangoAdmin_FastAPI_NaiveVue/zh/volume7/git.md | 2 +- DjangoAdmin_Flask_AntdVue/zh/volume5/templates.md | 10 +++++----- DjangoAdmin_Flask_AntdVue/zh/volume7/git.md | 2 +- DjangoAdmin_Flask_EleVue/zh/volume5/templates.md | 10 +++++----- DjangoAdmin_Flask_EleVue/zh/volume7/git.md | 2 +- DjangoAdmin_Flask_NaiveVue/zh/volume5/templates.md | 10 +++++----- DjangoAdmin_Flask_NaiveVue/zh/volume7/git.md | 2 +- 19 files changed, 51 insertions(+), 51 deletions(-) diff --git a/DjangoAdmin_Django_AntdVue/zh/introduction.md b/DjangoAdmin_Django_AntdVue/zh/introduction.md index 92e1bc6..a547261 100644 --- a/DjangoAdmin_Django_AntdVue/zh/introduction.md +++ b/DjangoAdmin_Django_AntdVue/zh/introduction.md @@ -68,9 +68,9 @@ | Django+AntDesign前后端分离版 | 基于 Django、Django ORM、Vue3、AntDesign、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Django_AntdVue) | | Django+NaiveUI前后端分离版 | 基于 Django、Django ORM、Vue3、NaiveUI、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Django_NaiveVue) | | Flask+Layui混编版 | 基于 Flask、Jinja2、Layui 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_Layui) | -| Flask+ElementPlus前后端分离版 | 基于 Flask、SQLAlchemy、Pydantic、Vue3、ElementPlus、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_EleVue) | -| Flask+AntDesign前后端分离版 | 基于 Flask、SQLAlchemy、Pydantic、Vue3、AntDesign、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_AntdVue) | -| Flask+NaiveUI前后端分离版 | 基于 Flask、SQLAlchemy、Pydantic、Vue3、NaiveUI、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_NaiveVue) | +| Flask+ElementPlus前后端分离版 | 基于 Flask、SQLAlchemy、WTForms、Vue3、ElementPlus、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_EleVue) | +| Flask+AntDesign前后端分离版 | 基于 Flask、SQLAlchemy、WTForms、Vue3、AntDesign、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_AntdVue) | +| Flask+NaiveUI前后端分离版 | 基于 Flask、SQLAlchemy、WTForms、Vue3、NaiveUI、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_NaiveVue) | | FastAPI+Layui混编版 | 基于 FastAPI、Jinja2、Layui 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Fastapi_Layui) | | FastAPI+ElementPlus前后端分离版 | 基于 FastAPI、SQLAlchemy、Pydantic、Vue3、ElementPlus、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Fastapi_EleVue) | | FastAPI+AntDesign前后端分离版 | 基于 FastAPI、SQLAlchemy、Pydantic、Vue3、AntDesign、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Fastapi_AntdVue) | diff --git a/DjangoAdmin_Django_AntdVue/zh/volume7/git.md b/DjangoAdmin_Django_AntdVue/zh/volume7/git.md index 83bf1e1..4f64e0f 100644 --- a/DjangoAdmin_Django_AntdVue/zh/volume7/git.md +++ b/DjangoAdmin_Django_AntdVue/zh/volume7/git.md @@ -133,7 +133,7 @@ git tag -l ## .gitignore 配置 -```gitignore +```ini # Python __pycache__/ *.py[cod] diff --git a/DjangoAdmin_Django_EleVue/zh/introduction.md b/DjangoAdmin_Django_EleVue/zh/introduction.md index 65bc007..7a0606d 100644 --- a/DjangoAdmin_Django_EleVue/zh/introduction.md +++ b/DjangoAdmin_Django_EleVue/zh/introduction.md @@ -68,9 +68,9 @@ | Django+AntDesign前后端分离版 | 基于 Django、Django ORM、Vue3、AntDesign、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Django_AntdVue) | | Django+NaiveUI前后端分离版 | 基于 Django、Django ORM、Vue3、NaiveUI、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Django_NaiveVue) | | Flask+Layui混编版 | 基于 Flask、Jinja2、Layui 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_Layui) | -| Flask+ElementPlus前后端分离版 | 基于 Flask、SQLAlchemy、Pydantic、Vue3、ElementPlus、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_EleVue) | -| Flask+AntDesign前后端分离版 | 基于 Flask、SQLAlchemy、Pydantic、Vue3、AntDesign、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_AntdVue) | -| Flask+NaiveUI前后端分离版 | 基于 Flask、SQLAlchemy、Pydantic、Vue3、NaiveUI、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_NaiveVue) | +| Flask+ElementPlus前后端分离版 | 基于 Flask、SQLAlchemy、WTForms、Vue3、ElementPlus、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_EleVue) | +| Flask+AntDesign前后端分离版 | 基于 Flask、SQLAlchemy、WTForms、Vue3、AntDesign、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_AntdVue) | +| Flask+NaiveUI前后端分离版 | 基于 Flask、SQLAlchemy、WTForms、Vue3、NaiveUI、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_NaiveVue) | | FastAPI+Layui混编版 | 基于 FastAPI、Jinja2、Layui 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Fastapi_Layui) | | FastAPI+ElementPlus前后端分离版 | 基于 FastAPI、SQLAlchemy、Pydantic、Vue3、ElementPlus、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Fastapi_EleVue) | | FastAPI+AntDesign前后端分离版 | 基于 FastAPI、SQLAlchemy、Pydantic、Vue3、AntDesign、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Fastapi_AntdVue) | diff --git a/DjangoAdmin_Django_EleVue/zh/volume7/git.md b/DjangoAdmin_Django_EleVue/zh/volume7/git.md index 83bf1e1..4f64e0f 100644 --- a/DjangoAdmin_Django_EleVue/zh/volume7/git.md +++ b/DjangoAdmin_Django_EleVue/zh/volume7/git.md @@ -133,7 +133,7 @@ git tag -l ## .gitignore 配置 -```gitignore +```ini # Python __pycache__/ *.py[cod] diff --git a/DjangoAdmin_Django_NaiveVue/zh/introduction.md b/DjangoAdmin_Django_NaiveVue/zh/introduction.md index f7ec65d..ebcbca8 100644 --- a/DjangoAdmin_Django_NaiveVue/zh/introduction.md +++ b/DjangoAdmin_Django_NaiveVue/zh/introduction.md @@ -68,9 +68,9 @@ | Django+AntDesign前后端分离版 | 基于 Django、Django ORM、Vue3、AntDesign、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Django_AntdVue) | | Django+NaiveUI前后端分离版 | 基于 Django、Django ORM、Vue3、NaiveUI、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Django_NaiveVue) | | Flask+Layui混编版 | 基于 Flask、Jinja2、Layui 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_Layui) | -| Flask+ElementPlus前后端分离版 | 基于 Flask、SQLAlchemy、Pydantic、Vue3、ElementPlus、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_EleVue) | -| Flask+AntDesign前后端分离版 | 基于 Flask、SQLAlchemy、Pydantic、Vue3、AntDesign、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_AntdVue) | -| Flask+NaiveUI前后端分离版 | 基于 Flask、SQLAlchemy、Pydantic、Vue3、NaiveUI、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_NaiveVue) | +| Flask+ElementPlus前后端分离版 | 基于 Flask、SQLAlchemy、WTForms、Vue3、ElementPlus、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_EleVue) | +| Flask+AntDesign前后端分离版 | 基于 Flask、SQLAlchemy、WTForms、Vue3、AntDesign、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_AntdVue) | +| Flask+NaiveUI前后端分离版 | 基于 Flask、SQLAlchemy、WTForms、Vue3、NaiveUI、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_NaiveVue) | | FastAPI+Layui混编版 | 基于 FastAPI、Jinja2、Layui 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Fastapi_Layui) | | FastAPI+ElementPlus前后端分离版 | 基于 FastAPI、SQLAlchemy、Pydantic、Vue3、ElementPlus、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Fastapi_EleVue) | | FastAPI+AntDesign前后端分离版 | 基于 FastAPI、SQLAlchemy、Pydantic、Vue3、AntDesign、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Fastapi_AntdVue) | diff --git a/DjangoAdmin_Django_NaiveVue/zh/volume7/git.md b/DjangoAdmin_Django_NaiveVue/zh/volume7/git.md index 83bf1e1..4f64e0f 100644 --- a/DjangoAdmin_Django_NaiveVue/zh/volume7/git.md +++ b/DjangoAdmin_Django_NaiveVue/zh/volume7/git.md @@ -133,7 +133,7 @@ git tag -l ## .gitignore 配置 -```gitignore +```ini # Python __pycache__/ *.py[cod] diff --git a/DjangoAdmin_FastAPI_AntdVue/zh/volume5/templates.md b/DjangoAdmin_FastAPI_AntdVue/zh/volume5/templates.md index 92e9710..5dedd40 100644 --- a/DjangoAdmin_FastAPI_AntdVue/zh/volume5/templates.md +++ b/DjangoAdmin_FastAPI_AntdVue/zh/volume5/templates.md @@ -171,7 +171,7 @@ templates/ 修改 `templates/models.py.tpl`: -```jinja2 +```jinja {% if f.db_type == 'String' %} {{ f.name }} = Column(String({{ f.db_args or 255 }}), nullable={{ 'True' if f.nullable else 'False' }}, index=True, comment="{{ f.comment }}") {% endif %} @@ -181,7 +181,7 @@ templates/ 修改 `templates/service.py.tpl`,在 Service 类中添加钩子方法: -```jinja2 +```jinja class {{ model_class_name }}Service(BaseService[{{ model_class_name }}]): # ... 差异点声明 ... @@ -197,7 +197,7 @@ class {{ model_class_name }}Service(BaseService[{{ model_class_name }}]): 修改 `templates/ui/columns.ts.tpl`: -```jinja2 +```jinja {% for f in list_fields %} { label: '{{ f.label }}', @@ -215,7 +215,7 @@ class {{ model_class_name }}Service(BaseService[{{ model_class_name }}]): 在 `templates/` 下新建 `test.py.tpl`: -```jinja2 +```jinja # tests/test_{{ app_name }}.py import pytest from modules.{{ app_name }}.service import {{ app_name }}_service @@ -248,7 +248,7 @@ BACKEND_TEMPLATES = [ ## Jinja2 语法速查 -```jinja2 +```jinja {# 注释 #} {# 变量输出 #} diff --git a/DjangoAdmin_FastAPI_AntdVue/zh/volume7/git.md b/DjangoAdmin_FastAPI_AntdVue/zh/volume7/git.md index 83bf1e1..4f64e0f 100644 --- a/DjangoAdmin_FastAPI_AntdVue/zh/volume7/git.md +++ b/DjangoAdmin_FastAPI_AntdVue/zh/volume7/git.md @@ -133,7 +133,7 @@ git tag -l ## .gitignore 配置 -```gitignore +```ini # Python __pycache__/ *.py[cod] diff --git a/DjangoAdmin_FastAPI_EleVue/zh/introduction.md b/DjangoAdmin_FastAPI_EleVue/zh/introduction.md index 1b752ac..fd3aeb1 100644 --- a/DjangoAdmin_FastAPI_EleVue/zh/introduction.md +++ b/DjangoAdmin_FastAPI_EleVue/zh/introduction.md @@ -72,9 +72,9 @@ | Django+AntDesign前后端分离版 | 基于 Django、Django ORM、Vue3、AntDesign、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Django_AntdVue) | | Django+NaiveUI前后端分离版 | 基于 Django、Django ORM、Vue3、NaiveUI、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Django_NaiveVue) | | Flask+Layui混编版 | 基于 Flask、Jinja2、Layui 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_Layui) | -| Flask+ElementPlus前后端分离版 | 基于 Flask、SQLAlchemy、Pydantic、Vue3、ElementPlus、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_EleVue) | -| Flask+AntDesign前后端分离版 | 基于 Flask、SQLAlchemy、Pydantic、Vue3、AntDesign、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_AntdVue) | -| Flask+NaiveUI前后端分离版 | 基于 Flask、SQLAlchemy、Pydantic、Vue3、NaiveUI、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_NaiveVue) | +| Flask+ElementPlus前后端分离版 | 基于 Flask、SQLAlchemy、WTForms、Vue3、ElementPlus、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_EleVue) | +| Flask+AntDesign前后端分离版 | 基于 Flask、SQLAlchemy、WTForms、Vue3、AntDesign、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_AntdVue) | +| Flask+NaiveUI前后端分离版 | 基于 Flask、SQLAlchemy、WTForms、Vue3、NaiveUI、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_NaiveVue) | | FastAPI+Layui混编版 | 基于 FastAPI、Jinja2、Layui 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Fastapi_Layui) | | FastAPI+ElementPlus前后端分离版 | 基于 FastAPI、SQLAlchemy、Pydantic、Vue3、ElementPlus、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Fastapi_EleVue) | | FastAPI+AntDesign前后端分离版 | 基于 FastAPI、SQLAlchemy、Pydantic、Vue3、AntDesign、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Fastapi_AntdVue) | diff --git a/DjangoAdmin_FastAPI_EleVue/zh/volume5/templates.md b/DjangoAdmin_FastAPI_EleVue/zh/volume5/templates.md index 92e9710..5dedd40 100644 --- a/DjangoAdmin_FastAPI_EleVue/zh/volume5/templates.md +++ b/DjangoAdmin_FastAPI_EleVue/zh/volume5/templates.md @@ -171,7 +171,7 @@ templates/ 修改 `templates/models.py.tpl`: -```jinja2 +```jinja {% if f.db_type == 'String' %} {{ f.name }} = Column(String({{ f.db_args or 255 }}), nullable={{ 'True' if f.nullable else 'False' }}, index=True, comment="{{ f.comment }}") {% endif %} @@ -181,7 +181,7 @@ templates/ 修改 `templates/service.py.tpl`,在 Service 类中添加钩子方法: -```jinja2 +```jinja class {{ model_class_name }}Service(BaseService[{{ model_class_name }}]): # ... 差异点声明 ... @@ -197,7 +197,7 @@ class {{ model_class_name }}Service(BaseService[{{ model_class_name }}]): 修改 `templates/ui/columns.ts.tpl`: -```jinja2 +```jinja {% for f in list_fields %} { label: '{{ f.label }}', @@ -215,7 +215,7 @@ class {{ model_class_name }}Service(BaseService[{{ model_class_name }}]): 在 `templates/` 下新建 `test.py.tpl`: -```jinja2 +```jinja # tests/test_{{ app_name }}.py import pytest from modules.{{ app_name }}.service import {{ app_name }}_service @@ -248,7 +248,7 @@ BACKEND_TEMPLATES = [ ## Jinja2 语法速查 -```jinja2 +```jinja {# 注释 #} {# 变量输出 #} diff --git a/DjangoAdmin_FastAPI_EleVue/zh/volume7/git.md b/DjangoAdmin_FastAPI_EleVue/zh/volume7/git.md index 83bf1e1..4f64e0f 100644 --- a/DjangoAdmin_FastAPI_EleVue/zh/volume7/git.md +++ b/DjangoAdmin_FastAPI_EleVue/zh/volume7/git.md @@ -133,7 +133,7 @@ git tag -l ## .gitignore 配置 -```gitignore +```ini # Python __pycache__/ *.py[cod] diff --git a/DjangoAdmin_FastAPI_NaiveVue/zh/volume5/templates.md b/DjangoAdmin_FastAPI_NaiveVue/zh/volume5/templates.md index 92e9710..5dedd40 100644 --- a/DjangoAdmin_FastAPI_NaiveVue/zh/volume5/templates.md +++ b/DjangoAdmin_FastAPI_NaiveVue/zh/volume5/templates.md @@ -171,7 +171,7 @@ templates/ 修改 `templates/models.py.tpl`: -```jinja2 +```jinja {% if f.db_type == 'String' %} {{ f.name }} = Column(String({{ f.db_args or 255 }}), nullable={{ 'True' if f.nullable else 'False' }}, index=True, comment="{{ f.comment }}") {% endif %} @@ -181,7 +181,7 @@ templates/ 修改 `templates/service.py.tpl`,在 Service 类中添加钩子方法: -```jinja2 +```jinja class {{ model_class_name }}Service(BaseService[{{ model_class_name }}]): # ... 差异点声明 ... @@ -197,7 +197,7 @@ class {{ model_class_name }}Service(BaseService[{{ model_class_name }}]): 修改 `templates/ui/columns.ts.tpl`: -```jinja2 +```jinja {% for f in list_fields %} { label: '{{ f.label }}', @@ -215,7 +215,7 @@ class {{ model_class_name }}Service(BaseService[{{ model_class_name }}]): 在 `templates/` 下新建 `test.py.tpl`: -```jinja2 +```jinja # tests/test_{{ app_name }}.py import pytest from modules.{{ app_name }}.service import {{ app_name }}_service @@ -248,7 +248,7 @@ BACKEND_TEMPLATES = [ ## Jinja2 语法速查 -```jinja2 +```jinja {# 注释 #} {# 变量输出 #} diff --git a/DjangoAdmin_FastAPI_NaiveVue/zh/volume7/git.md b/DjangoAdmin_FastAPI_NaiveVue/zh/volume7/git.md index 83bf1e1..4f64e0f 100644 --- a/DjangoAdmin_FastAPI_NaiveVue/zh/volume7/git.md +++ b/DjangoAdmin_FastAPI_NaiveVue/zh/volume7/git.md @@ -133,7 +133,7 @@ git tag -l ## .gitignore 配置 -```gitignore +```ini # Python __pycache__/ *.py[cod] diff --git a/DjangoAdmin_Flask_AntdVue/zh/volume5/templates.md b/DjangoAdmin_Flask_AntdVue/zh/volume5/templates.md index 6e3b8bf..2ed50eb 100644 --- a/DjangoAdmin_Flask_AntdVue/zh/volume5/templates.md +++ b/DjangoAdmin_Flask_AntdVue/zh/volume5/templates.md @@ -171,7 +171,7 @@ templates/ 修改 `templates/models.py.tpl`: -```jinja2 +```jinja {% if f.db_type == 'String' %} {{ f.name }} = Column(String({{ f.db_args or 255 }}), nullable={{ 'True' if f.nullable else 'False' }}, index=True, comment="{{ f.comment }}") {% endif %} @@ -181,7 +181,7 @@ templates/ 修改 `templates/service.py.tpl`,在 Service 类中添加钩子方法: -```jinja2 +```jinja class {{ model_class_name }}Service(BaseService): repository = {{ model_class_name }}Repository form = {{ model_class_name }}Form @@ -201,7 +201,7 @@ class {{ model_class_name }}Service(BaseService): 修改 `templates/ui/columns.ts.tpl`: -```jinja2 +```jinja {% for f in list_fields %} { label: '{{ f.label }}', @@ -219,7 +219,7 @@ class {{ model_class_name }}Service(BaseService): 在 `templates/` 下新建 `test.py.tpl`: -```jinja2 +```jinja # tests/test_{{ app_name }}.py import pytest from src.modules.{{ app_name }}.service import {{ app_name }}_service @@ -253,7 +253,7 @@ BACKEND_TEMPLATES = [ ## Jinja2 语法速查 -```jinja2 +```jinja {# 注释 #} {# 变量输出 #} diff --git a/DjangoAdmin_Flask_AntdVue/zh/volume7/git.md b/DjangoAdmin_Flask_AntdVue/zh/volume7/git.md index 83bf1e1..4f64e0f 100644 --- a/DjangoAdmin_Flask_AntdVue/zh/volume7/git.md +++ b/DjangoAdmin_Flask_AntdVue/zh/volume7/git.md @@ -133,7 +133,7 @@ git tag -l ## .gitignore 配置 -```gitignore +```ini # Python __pycache__/ *.py[cod] diff --git a/DjangoAdmin_Flask_EleVue/zh/volume5/templates.md b/DjangoAdmin_Flask_EleVue/zh/volume5/templates.md index 6e3b8bf..2ed50eb 100644 --- a/DjangoAdmin_Flask_EleVue/zh/volume5/templates.md +++ b/DjangoAdmin_Flask_EleVue/zh/volume5/templates.md @@ -171,7 +171,7 @@ templates/ 修改 `templates/models.py.tpl`: -```jinja2 +```jinja {% if f.db_type == 'String' %} {{ f.name }} = Column(String({{ f.db_args or 255 }}), nullable={{ 'True' if f.nullable else 'False' }}, index=True, comment="{{ f.comment }}") {% endif %} @@ -181,7 +181,7 @@ templates/ 修改 `templates/service.py.tpl`,在 Service 类中添加钩子方法: -```jinja2 +```jinja class {{ model_class_name }}Service(BaseService): repository = {{ model_class_name }}Repository form = {{ model_class_name }}Form @@ -201,7 +201,7 @@ class {{ model_class_name }}Service(BaseService): 修改 `templates/ui/columns.ts.tpl`: -```jinja2 +```jinja {% for f in list_fields %} { label: '{{ f.label }}', @@ -219,7 +219,7 @@ class {{ model_class_name }}Service(BaseService): 在 `templates/` 下新建 `test.py.tpl`: -```jinja2 +```jinja # tests/test_{{ app_name }}.py import pytest from src.modules.{{ app_name }}.service import {{ app_name }}_service @@ -253,7 +253,7 @@ BACKEND_TEMPLATES = [ ## Jinja2 语法速查 -```jinja2 +```jinja {# 注释 #} {# 变量输出 #} diff --git a/DjangoAdmin_Flask_EleVue/zh/volume7/git.md b/DjangoAdmin_Flask_EleVue/zh/volume7/git.md index 83bf1e1..4f64e0f 100644 --- a/DjangoAdmin_Flask_EleVue/zh/volume7/git.md +++ b/DjangoAdmin_Flask_EleVue/zh/volume7/git.md @@ -133,7 +133,7 @@ git tag -l ## .gitignore 配置 -```gitignore +```ini # Python __pycache__/ *.py[cod] diff --git a/DjangoAdmin_Flask_NaiveVue/zh/volume5/templates.md b/DjangoAdmin_Flask_NaiveVue/zh/volume5/templates.md index 6e3b8bf..2ed50eb 100644 --- a/DjangoAdmin_Flask_NaiveVue/zh/volume5/templates.md +++ b/DjangoAdmin_Flask_NaiveVue/zh/volume5/templates.md @@ -171,7 +171,7 @@ templates/ 修改 `templates/models.py.tpl`: -```jinja2 +```jinja {% if f.db_type == 'String' %} {{ f.name }} = Column(String({{ f.db_args or 255 }}), nullable={{ 'True' if f.nullable else 'False' }}, index=True, comment="{{ f.comment }}") {% endif %} @@ -181,7 +181,7 @@ templates/ 修改 `templates/service.py.tpl`,在 Service 类中添加钩子方法: -```jinja2 +```jinja class {{ model_class_name }}Service(BaseService): repository = {{ model_class_name }}Repository form = {{ model_class_name }}Form @@ -201,7 +201,7 @@ class {{ model_class_name }}Service(BaseService): 修改 `templates/ui/columns.ts.tpl`: -```jinja2 +```jinja {% for f in list_fields %} { label: '{{ f.label }}', @@ -219,7 +219,7 @@ class {{ model_class_name }}Service(BaseService): 在 `templates/` 下新建 `test.py.tpl`: -```jinja2 +```jinja # tests/test_{{ app_name }}.py import pytest from src.modules.{{ app_name }}.service import {{ app_name }}_service @@ -253,7 +253,7 @@ BACKEND_TEMPLATES = [ ## Jinja2 语法速查 -```jinja2 +```jinja {# 注释 #} {# 变量输出 #} diff --git a/DjangoAdmin_Flask_NaiveVue/zh/volume7/git.md b/DjangoAdmin_Flask_NaiveVue/zh/volume7/git.md index 83bf1e1..4f64e0f 100644 --- a/DjangoAdmin_Flask_NaiveVue/zh/volume7/git.md +++ b/DjangoAdmin_Flask_NaiveVue/zh/volume7/git.md @@ -133,7 +133,7 @@ git tag -l ## .gitignore 配置 -```gitignore +```ini # Python __pycache__/ *.py[cod]