Python-快速搭建一个管理平台

目录

[📜 准备工作](#📜 准备工作)

[一、项目介绍 ✨](#一、项目介绍 ✨)

[二、制作数据库表 + 添加信息 ⚒️](#二、制作数据库表 + 添加信息 ⚒️)

[三、运行client.exe 🚀](#三、运行client.exe 🚀)

1、连接数据库,选择对应表,生成代码

2、把后端代码依次复制到项目中

3、把前端代码依次复制到前端项目中

4、添加路由

[四、运行后端项目 🎉](#四、运行后端项目 🎉)

1、安装第三方库

2、运行项目

[五、运行前端项目 🎉](#五、运行前端项目 🎉)

1、安装包

2、运行项目

[六、涉及开源项目与框架 💎](#六、涉及开源项目与框架 💎)

1、前端

2、后端

对于不需要复杂权限控制的小型项目,十分适用,可以快速一个管理平台

视频操作:

https://www.bilibili.com/video/BV1Bx4y1z7XGhttps://www.bilibili.com/video/BV1Bx4y1z7XG

📜 准备工作

1 、node版本大于等于v16.20.2【推荐用nvm】

Nvm 安装教程:前端------Windows安装NVM(下载与使用)_window nvm 下载-CSDN博客文章浏览阅读1.5k次,点赞12次,收藏22次。在 Windows 上安装 Node Version Manager(NVM)可以让您轻松管理不同版本的 Node.js。首先,从 GitHub 上下载最新的 NVM for Windows 安装程序,并执行安装。安装完成后,在命令行中输入 nvm 命令即可验证安装。接着,使用 nvm install 命令安装所需的 Node.js 版本,例如 nvm install 14.17.0。通过 nvm use 来切换使用特定版本,例如 nvm use 14.17.0。_window nvm 下载https://blog.csdn.net/Pan_peter/article/details/136487076
2 、安装Python(版本大于等于3.8) 【推荐用conda,自行找conda安装教程】
项目包:

项目包.zip - 蓝奏云文件大小:17.9 M|https://wwm.lanzout.com/ihQOR1xblvdg

一、项目介绍 ✨

client.exe ------通过已有数据库表,生成FastAPI接口、前端接口、前端页面的配置
生成代码前后端代码:

GitHub - zy7y/dfs-generate: 从数据库逆向生成SQLModel、TortoiseORM模型、FastAPI 接口、Vue TS后台管理页,有效减少重复编码,👀https://www.bilibili.com/video/BV1Gp4y1d7P8/从数据库逆向生成SQLModel、TortoiseORM模型、FastAPI 接口、Vue TS后台管理页,有效减少重复编码,👀https://www.bilibili.com/video/BV1Gp4y1d7P8/ - zy7y/dfs-generatehttps://github.com/zy7y/dfs-generate

前端框架:React

后端框架:bottle

二、制作数据库表 + 添加信息 ⚒️

使用Navicat、PyCharm等

sql 复制代码
use yolov8;



-- auto-generated definition

create table user

(

    id       int auto_increment comment '用户id'

        primary key,

    username varchar(50)  not null comment '用户名',

    password varchar(20)  not null comment '密码',

    email    varchar(30)  not null comment '邮箱',

    usertype   int null comment '类型'

);



INSERT INTO user (username, password, email, usertype) VALUES ('user1', 'password1', 'user1@example.com', 1);

INSERT INTO user (username, password, email, usertype) VALUES ('user2', 'password2', 'user2@example.com', 2);

INSERT INTO user (username, password, email, usertype) VALUES ('user3', 'password3', 'user3@example.com', 1);

INSERT INTO user (username, password, email, usertype) VALUES ('user4', 'password4', 'user4@example.com', 2);

INSERT INTO user (username, password, email, usertype) VALUES ('user5', 'password5', 'user5@example.com', 1);

INSERT INTO user (username, password, email, usertype) VALUES ('user6', 'password6', 'user6@example.com', 2);

INSERT INTO user (username, password, email, usertype) VALUES ('user7', 'password7', 'user7@example.com', 1);

INSERT INTO user (username, password, email, usertype) VALUES ('user8', 'password8', 'user8@example.com', 2);

INSERT INTO user (username, password, email, usertype) VALUES ('user9', 'password9', 'user9@example.com', 1);

INSERT INTO user (username, password, email, usertype) VALUES ('user10', 'password10', 'user10@example.com', 2);

INSERT INTO user (username, password, email, usertype) VALUES ('user11', 'password11', 'user11@example.com', 1);

INSERT INTO user (username, password, email, usertype) VALUES ('user12', 'password12', 'user12@example.com', 2);

INSERT INTO user (username, password, email, usertype) VALUES ('user13', 'password13', 'user13@example.com', 1);

INSERT INTO user (username, password, email, usertype) VALUES ('user14', 'password14', 'user14@example.com', 2);

INSERT INTO user (username, password, email, usertype) VALUES ('user15', 'password15', 'user15@example.com', 1);

INSERT INTO user (username, password, email, usertype) VALUES ('user16', 'password16', 'user16@example.com', 2);

INSERT INTO user (username, password, email, usertype) VALUES ('user17', 'password17', 'user17@example.com', 1);

INSERT INTO user (username, password, email, usertype) VALUES ('user18', 'password18', 'user18@example.com', 2);

INSERT INTO user (username, password, email, usertype) VALUES ('user19', 'password19', 'user19@example.com', 1);

INSERT INTO user (username, password, email, usertype) VALUES ('user20', 'password20', 'user20@example.com', 2);

INSERT INTO user (username, password, email, usertype) VALUES ('user21', 'password21', 'user20@example.com', 1);

三、运行client.exe 🚀

1、连接数据库,选择对应表,生成代码

2、把后端代码依次复制到项目中


3、把前端代码依次复制到前端项目中

这三个文件

4、添加路由

四、运行后端项目 🎉

1、安装第三方库

pip install -r requirements-all.txt

2、运行项目

python main.py

五、运行前端项目 🎉

1、安装包

npm install --force

2、运行项目

npm run dev

六、涉及开源项目与框架 💎

1、前端

面向配置,生成前端的CRUD页面:FastCrud | 基于配置 & 快速开发crud面向配置的CRUD编程.http://fast-crud.docmirror.cn/

2、后端

Fastapi

相关推荐
茶卡盐佑星_2 分钟前
说说你对es6中promise的理解?
前端·ecmascript·es6
qq_273900233 分钟前
解析TMalign文本文件中的转换矩阵
python·生物信息学
Манго нектар30 分钟前
JavaScript for循环语句
开发语言·前端·javascript
蒲公英100137 分钟前
vue3学习:axios输入城市名称查询该城市天气
前端·vue.js·学习
阿华的代码王国1 小时前
【JavaEE】——文件IO的应用
开发语言·python
天涯学馆1 小时前
Deno与Secure TypeScript:安全的后端开发
前端·typescript·deno
以对_1 小时前
uview表单校验不生效问题
前端·uni-app
电饭叔1 小时前
《python语言程序设计》2018版第8章19题几何Rectangle2D类(下)-头疼的几何和数学
开发语言·python
程序猿小D2 小时前
第二百六十七节 JPA教程 - JPA查询AND条件示例
java·开发语言·前端·数据库·windows·python·jpa
奔跑吧邓邓子2 小时前
npm包管理深度探索:从基础到进阶全面教程!
前端·npm·node.js