优化更新
This commit is contained in:
@@ -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+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) |
|
| 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+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+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、Pydantic、Vue3、AntDesign、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_AntdVue) |
|
| 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、Pydantic、Vue3、NaiveUI、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_NaiveVue) |
|
| 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+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+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) |
|
| FastAPI+AntDesign前后端分离版 | 基于 FastAPI、SQLAlchemy、Pydantic、Vue3、AntDesign、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Fastapi_AntdVue) |
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ git tag -l
|
|||||||
|
|
||||||
## .gitignore 配置
|
## .gitignore 配置
|
||||||
|
|
||||||
```gitignore
|
```ini
|
||||||
# Python
|
# Python
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
|
|||||||
@@ -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+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) |
|
| 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+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+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、Pydantic、Vue3、AntDesign、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_AntdVue) |
|
| 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、Pydantic、Vue3、NaiveUI、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_NaiveVue) |
|
| 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+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+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) |
|
| FastAPI+AntDesign前后端分离版 | 基于 FastAPI、SQLAlchemy、Pydantic、Vue3、AntDesign、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Fastapi_AntdVue) |
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ git tag -l
|
|||||||
|
|
||||||
## .gitignore 配置
|
## .gitignore 配置
|
||||||
|
|
||||||
```gitignore
|
```ini
|
||||||
# Python
|
# Python
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
|
|||||||
@@ -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+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) |
|
| 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+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+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、Pydantic、Vue3、AntDesign、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_AntdVue) |
|
| 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、Pydantic、Vue3、NaiveUI、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_NaiveVue) |
|
| 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+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+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) |
|
| FastAPI+AntDesign前后端分离版 | 基于 FastAPI、SQLAlchemy、Pydantic、Vue3、AntDesign、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Fastapi_AntdVue) |
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ git tag -l
|
|||||||
|
|
||||||
## .gitignore 配置
|
## .gitignore 配置
|
||||||
|
|
||||||
```gitignore
|
```ini
|
||||||
# Python
|
# Python
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ templates/
|
|||||||
|
|
||||||
修改 `templates/models.py.tpl`:
|
修改 `templates/models.py.tpl`:
|
||||||
|
|
||||||
```jinja2
|
```jinja
|
||||||
{% if f.db_type == 'String' %}
|
{% 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 }}")
|
{{ f.name }} = Column(String({{ f.db_args or 255 }}), nullable={{ 'True' if f.nullable else 'False' }}, index=True, comment="{{ f.comment }}")
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -181,7 +181,7 @@ templates/
|
|||||||
|
|
||||||
修改 `templates/service.py.tpl`,在 Service 类中添加钩子方法:
|
修改 `templates/service.py.tpl`,在 Service 类中添加钩子方法:
|
||||||
|
|
||||||
```jinja2
|
```jinja
|
||||||
class {{ model_class_name }}Service(BaseService[{{ model_class_name }}]):
|
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`:
|
修改 `templates/ui/columns.ts.tpl`:
|
||||||
|
|
||||||
```jinja2
|
```jinja
|
||||||
{% for f in list_fields %}
|
{% for f in list_fields %}
|
||||||
{
|
{
|
||||||
label: '{{ f.label }}',
|
label: '{{ f.label }}',
|
||||||
@@ -215,7 +215,7 @@ class {{ model_class_name }}Service(BaseService[{{ model_class_name }}]):
|
|||||||
|
|
||||||
在 `templates/` 下新建 `test.py.tpl`:
|
在 `templates/` 下新建 `test.py.tpl`:
|
||||||
|
|
||||||
```jinja2
|
```jinja
|
||||||
# tests/test_{{ app_name }}.py
|
# tests/test_{{ app_name }}.py
|
||||||
import pytest
|
import pytest
|
||||||
from modules.{{ app_name }}.service import {{ app_name }}_service
|
from modules.{{ app_name }}.service import {{ app_name }}_service
|
||||||
@@ -248,7 +248,7 @@ BACKEND_TEMPLATES = [
|
|||||||
|
|
||||||
## Jinja2 语法速查
|
## Jinja2 语法速查
|
||||||
|
|
||||||
```jinja2
|
```jinja
|
||||||
{# 注释 #}
|
{# 注释 #}
|
||||||
|
|
||||||
{# 变量输出 #}
|
{# 变量输出 #}
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ git tag -l
|
|||||||
|
|
||||||
## .gitignore 配置
|
## .gitignore 配置
|
||||||
|
|
||||||
```gitignore
|
```ini
|
||||||
# Python
|
# Python
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
|
|||||||
@@ -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+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) |
|
| 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+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+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、Pydantic、Vue3、AntDesign、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_AntdVue) |
|
| 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、Pydantic、Vue3、NaiveUI、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Flask_NaiveVue) |
|
| 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+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+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) |
|
| FastAPI+AntDesign前后端分离版 | 基于 FastAPI、SQLAlchemy、Pydantic、Vue3、AntDesign、TypeScript、Vite 等技术栈,支持 MySQL、PostgreSQL、SQLite、Oracle、SQL Server 等数据库 | [Gitee地址](https://gitee.com/djangoadmin/DjangoAdmin_Fastapi_AntdVue) |
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ templates/
|
|||||||
|
|
||||||
修改 `templates/models.py.tpl`:
|
修改 `templates/models.py.tpl`:
|
||||||
|
|
||||||
```jinja2
|
```jinja
|
||||||
{% if f.db_type == 'String' %}
|
{% 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 }}")
|
{{ f.name }} = Column(String({{ f.db_args or 255 }}), nullable={{ 'True' if f.nullable else 'False' }}, index=True, comment="{{ f.comment }}")
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -181,7 +181,7 @@ templates/
|
|||||||
|
|
||||||
修改 `templates/service.py.tpl`,在 Service 类中添加钩子方法:
|
修改 `templates/service.py.tpl`,在 Service 类中添加钩子方法:
|
||||||
|
|
||||||
```jinja2
|
```jinja
|
||||||
class {{ model_class_name }}Service(BaseService[{{ model_class_name }}]):
|
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`:
|
修改 `templates/ui/columns.ts.tpl`:
|
||||||
|
|
||||||
```jinja2
|
```jinja
|
||||||
{% for f in list_fields %}
|
{% for f in list_fields %}
|
||||||
{
|
{
|
||||||
label: '{{ f.label }}',
|
label: '{{ f.label }}',
|
||||||
@@ -215,7 +215,7 @@ class {{ model_class_name }}Service(BaseService[{{ model_class_name }}]):
|
|||||||
|
|
||||||
在 `templates/` 下新建 `test.py.tpl`:
|
在 `templates/` 下新建 `test.py.tpl`:
|
||||||
|
|
||||||
```jinja2
|
```jinja
|
||||||
# tests/test_{{ app_name }}.py
|
# tests/test_{{ app_name }}.py
|
||||||
import pytest
|
import pytest
|
||||||
from modules.{{ app_name }}.service import {{ app_name }}_service
|
from modules.{{ app_name }}.service import {{ app_name }}_service
|
||||||
@@ -248,7 +248,7 @@ BACKEND_TEMPLATES = [
|
|||||||
|
|
||||||
## Jinja2 语法速查
|
## Jinja2 语法速查
|
||||||
|
|
||||||
```jinja2
|
```jinja
|
||||||
{# 注释 #}
|
{# 注释 #}
|
||||||
|
|
||||||
{# 变量输出 #}
|
{# 变量输出 #}
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ git tag -l
|
|||||||
|
|
||||||
## .gitignore 配置
|
## .gitignore 配置
|
||||||
|
|
||||||
```gitignore
|
```ini
|
||||||
# Python
|
# Python
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ templates/
|
|||||||
|
|
||||||
修改 `templates/models.py.tpl`:
|
修改 `templates/models.py.tpl`:
|
||||||
|
|
||||||
```jinja2
|
```jinja
|
||||||
{% if f.db_type == 'String' %}
|
{% 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 }}")
|
{{ f.name }} = Column(String({{ f.db_args or 255 }}), nullable={{ 'True' if f.nullable else 'False' }}, index=True, comment="{{ f.comment }}")
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -181,7 +181,7 @@ templates/
|
|||||||
|
|
||||||
修改 `templates/service.py.tpl`,在 Service 类中添加钩子方法:
|
修改 `templates/service.py.tpl`,在 Service 类中添加钩子方法:
|
||||||
|
|
||||||
```jinja2
|
```jinja
|
||||||
class {{ model_class_name }}Service(BaseService[{{ model_class_name }}]):
|
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`:
|
修改 `templates/ui/columns.ts.tpl`:
|
||||||
|
|
||||||
```jinja2
|
```jinja
|
||||||
{% for f in list_fields %}
|
{% for f in list_fields %}
|
||||||
{
|
{
|
||||||
label: '{{ f.label }}',
|
label: '{{ f.label }}',
|
||||||
@@ -215,7 +215,7 @@ class {{ model_class_name }}Service(BaseService[{{ model_class_name }}]):
|
|||||||
|
|
||||||
在 `templates/` 下新建 `test.py.tpl`:
|
在 `templates/` 下新建 `test.py.tpl`:
|
||||||
|
|
||||||
```jinja2
|
```jinja
|
||||||
# tests/test_{{ app_name }}.py
|
# tests/test_{{ app_name }}.py
|
||||||
import pytest
|
import pytest
|
||||||
from modules.{{ app_name }}.service import {{ app_name }}_service
|
from modules.{{ app_name }}.service import {{ app_name }}_service
|
||||||
@@ -248,7 +248,7 @@ BACKEND_TEMPLATES = [
|
|||||||
|
|
||||||
## Jinja2 语法速查
|
## Jinja2 语法速查
|
||||||
|
|
||||||
```jinja2
|
```jinja
|
||||||
{# 注释 #}
|
{# 注释 #}
|
||||||
|
|
||||||
{# 变量输出 #}
|
{# 变量输出 #}
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ git tag -l
|
|||||||
|
|
||||||
## .gitignore 配置
|
## .gitignore 配置
|
||||||
|
|
||||||
```gitignore
|
```ini
|
||||||
# Python
|
# Python
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ templates/
|
|||||||
|
|
||||||
修改 `templates/models.py.tpl`:
|
修改 `templates/models.py.tpl`:
|
||||||
|
|
||||||
```jinja2
|
```jinja
|
||||||
{% if f.db_type == 'String' %}
|
{% 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 }}")
|
{{ f.name }} = Column(String({{ f.db_args or 255 }}), nullable={{ 'True' if f.nullable else 'False' }}, index=True, comment="{{ f.comment }}")
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -181,7 +181,7 @@ templates/
|
|||||||
|
|
||||||
修改 `templates/service.py.tpl`,在 Service 类中添加钩子方法:
|
修改 `templates/service.py.tpl`,在 Service 类中添加钩子方法:
|
||||||
|
|
||||||
```jinja2
|
```jinja
|
||||||
class {{ model_class_name }}Service(BaseService):
|
class {{ model_class_name }}Service(BaseService):
|
||||||
repository = {{ model_class_name }}Repository
|
repository = {{ model_class_name }}Repository
|
||||||
form = {{ model_class_name }}Form
|
form = {{ model_class_name }}Form
|
||||||
@@ -201,7 +201,7 @@ class {{ model_class_name }}Service(BaseService):
|
|||||||
|
|
||||||
修改 `templates/ui/columns.ts.tpl`:
|
修改 `templates/ui/columns.ts.tpl`:
|
||||||
|
|
||||||
```jinja2
|
```jinja
|
||||||
{% for f in list_fields %}
|
{% for f in list_fields %}
|
||||||
{
|
{
|
||||||
label: '{{ f.label }}',
|
label: '{{ f.label }}',
|
||||||
@@ -219,7 +219,7 @@ class {{ model_class_name }}Service(BaseService):
|
|||||||
|
|
||||||
在 `templates/` 下新建 `test.py.tpl`:
|
在 `templates/` 下新建 `test.py.tpl`:
|
||||||
|
|
||||||
```jinja2
|
```jinja
|
||||||
# tests/test_{{ app_name }}.py
|
# tests/test_{{ app_name }}.py
|
||||||
import pytest
|
import pytest
|
||||||
from src.modules.{{ app_name }}.service import {{ app_name }}_service
|
from src.modules.{{ app_name }}.service import {{ app_name }}_service
|
||||||
@@ -253,7 +253,7 @@ BACKEND_TEMPLATES = [
|
|||||||
|
|
||||||
## Jinja2 语法速查
|
## Jinja2 语法速查
|
||||||
|
|
||||||
```jinja2
|
```jinja
|
||||||
{# 注释 #}
|
{# 注释 #}
|
||||||
|
|
||||||
{# 变量输出 #}
|
{# 变量输出 #}
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ git tag -l
|
|||||||
|
|
||||||
## .gitignore 配置
|
## .gitignore 配置
|
||||||
|
|
||||||
```gitignore
|
```ini
|
||||||
# Python
|
# Python
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ templates/
|
|||||||
|
|
||||||
修改 `templates/models.py.tpl`:
|
修改 `templates/models.py.tpl`:
|
||||||
|
|
||||||
```jinja2
|
```jinja
|
||||||
{% if f.db_type == 'String' %}
|
{% 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 }}")
|
{{ f.name }} = Column(String({{ f.db_args or 255 }}), nullable={{ 'True' if f.nullable else 'False' }}, index=True, comment="{{ f.comment }}")
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -181,7 +181,7 @@ templates/
|
|||||||
|
|
||||||
修改 `templates/service.py.tpl`,在 Service 类中添加钩子方法:
|
修改 `templates/service.py.tpl`,在 Service 类中添加钩子方法:
|
||||||
|
|
||||||
```jinja2
|
```jinja
|
||||||
class {{ model_class_name }}Service(BaseService):
|
class {{ model_class_name }}Service(BaseService):
|
||||||
repository = {{ model_class_name }}Repository
|
repository = {{ model_class_name }}Repository
|
||||||
form = {{ model_class_name }}Form
|
form = {{ model_class_name }}Form
|
||||||
@@ -201,7 +201,7 @@ class {{ model_class_name }}Service(BaseService):
|
|||||||
|
|
||||||
修改 `templates/ui/columns.ts.tpl`:
|
修改 `templates/ui/columns.ts.tpl`:
|
||||||
|
|
||||||
```jinja2
|
```jinja
|
||||||
{% for f in list_fields %}
|
{% for f in list_fields %}
|
||||||
{
|
{
|
||||||
label: '{{ f.label }}',
|
label: '{{ f.label }}',
|
||||||
@@ -219,7 +219,7 @@ class {{ model_class_name }}Service(BaseService):
|
|||||||
|
|
||||||
在 `templates/` 下新建 `test.py.tpl`:
|
在 `templates/` 下新建 `test.py.tpl`:
|
||||||
|
|
||||||
```jinja2
|
```jinja
|
||||||
# tests/test_{{ app_name }}.py
|
# tests/test_{{ app_name }}.py
|
||||||
import pytest
|
import pytest
|
||||||
from src.modules.{{ app_name }}.service import {{ app_name }}_service
|
from src.modules.{{ app_name }}.service import {{ app_name }}_service
|
||||||
@@ -253,7 +253,7 @@ BACKEND_TEMPLATES = [
|
|||||||
|
|
||||||
## Jinja2 语法速查
|
## Jinja2 语法速查
|
||||||
|
|
||||||
```jinja2
|
```jinja
|
||||||
{# 注释 #}
|
{# 注释 #}
|
||||||
|
|
||||||
{# 变量输出 #}
|
{# 变量输出 #}
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ git tag -l
|
|||||||
|
|
||||||
## .gitignore 配置
|
## .gitignore 配置
|
||||||
|
|
||||||
```gitignore
|
```ini
|
||||||
# Python
|
# Python
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ templates/
|
|||||||
|
|
||||||
修改 `templates/models.py.tpl`:
|
修改 `templates/models.py.tpl`:
|
||||||
|
|
||||||
```jinja2
|
```jinja
|
||||||
{% if f.db_type == 'String' %}
|
{% 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 }}")
|
{{ f.name }} = Column(String({{ f.db_args or 255 }}), nullable={{ 'True' if f.nullable else 'False' }}, index=True, comment="{{ f.comment }}")
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -181,7 +181,7 @@ templates/
|
|||||||
|
|
||||||
修改 `templates/service.py.tpl`,在 Service 类中添加钩子方法:
|
修改 `templates/service.py.tpl`,在 Service 类中添加钩子方法:
|
||||||
|
|
||||||
```jinja2
|
```jinja
|
||||||
class {{ model_class_name }}Service(BaseService):
|
class {{ model_class_name }}Service(BaseService):
|
||||||
repository = {{ model_class_name }}Repository
|
repository = {{ model_class_name }}Repository
|
||||||
form = {{ model_class_name }}Form
|
form = {{ model_class_name }}Form
|
||||||
@@ -201,7 +201,7 @@ class {{ model_class_name }}Service(BaseService):
|
|||||||
|
|
||||||
修改 `templates/ui/columns.ts.tpl`:
|
修改 `templates/ui/columns.ts.tpl`:
|
||||||
|
|
||||||
```jinja2
|
```jinja
|
||||||
{% for f in list_fields %}
|
{% for f in list_fields %}
|
||||||
{
|
{
|
||||||
label: '{{ f.label }}',
|
label: '{{ f.label }}',
|
||||||
@@ -219,7 +219,7 @@ class {{ model_class_name }}Service(BaseService):
|
|||||||
|
|
||||||
在 `templates/` 下新建 `test.py.tpl`:
|
在 `templates/` 下新建 `test.py.tpl`:
|
||||||
|
|
||||||
```jinja2
|
```jinja
|
||||||
# tests/test_{{ app_name }}.py
|
# tests/test_{{ app_name }}.py
|
||||||
import pytest
|
import pytest
|
||||||
from src.modules.{{ app_name }}.service import {{ app_name }}_service
|
from src.modules.{{ app_name }}.service import {{ app_name }}_service
|
||||||
@@ -253,7 +253,7 @@ BACKEND_TEMPLATES = [
|
|||||||
|
|
||||||
## Jinja2 语法速查
|
## Jinja2 语法速查
|
||||||
|
|
||||||
```jinja2
|
```jinja
|
||||||
{# 注释 #}
|
{# 注释 #}
|
||||||
|
|
||||||
{# 变量输出 #}
|
{# 变量输出 #}
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ git tag -l
|
|||||||
|
|
||||||
## .gitignore 配置
|
## .gitignore 配置
|
||||||
|
|
||||||
```gitignore
|
```ini
|
||||||
# Python
|
# Python
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
|
|||||||
Reference in New Issue
Block a user