django-vue3-admin Django-Vue3-Admin is a comprehensive basic development platform based on the RBAC (Role-Based Access Control) model for permission control, with column-level granularity. It follows a frontend-backend separation architecture, with 项目地址: https://gitcode.com/gh_mirrors/dj/django-vue3-admin
Django-Vue3-Admin 项目的目录结构如下:
django-vue3-admin/
├── backend/
│ ├── conf/
│ ├── docker_env/
│ ├── web/
│ ├── manage.py
│ ├── requirements.txt
│ └── ...
├── web/
│ ├── public/
│ ├── src/
│ ├── .env.development
│ ├── .env.production
│ ├── package.json
│ ├── vite.config.ts
│ └── ...
├── docker-compose.yml
├── README.md
├── README.zh.md
└── ...
backend/: 后端代码目录,包含 Django 项目的主要代码。
web/: 前端代码目录,包含 Vue3 项目的主要代码。
docker-compose.yml: Docker Compose 配置文件,用于一键启动项目。
README.md: 项目英文介绍文档。
README.zh.md: 项目中文介绍文档。
# 启动 Django 服务器
python3 manage.py runserver 0.0.0.0:8000
# 使用 Uvicorn 启动
uvicorn application.asgi:application --port 8000 --host 0.0.0.0 --workers 8
# 安装依赖
npm install
# 启动开发服务器
npm run dev
# 构建生产环境
npm run build
env.py
,并在其中配置数据库信息。# 示例配置
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'your_database_name',
'USER': 'your_database_user',
'PASSWORD': 'your_database_password',
'HOST': 'localhost',
'PORT': '3306',
}
}
# 示例配置
VITE_PORT=8080
VITE_BASE_URL=http://localhost:8000
# 示例配置
VITE_PORT=80
VITE_BASE_URL=https://yourdomain.com
通过以上配置文件,可以灵活地调整项目的运行环境和参数。
django-vue3-admin Django-Vue3-Admin is a comprehensive basic development platform based on the RBAC (Role-Based Access Control) model for permission control, with column-level granularity. It follows a frontend-backend separation architecture, with 项目地址: https://gitcode.com/gh_mirrors/dj/django-vue3-admin