# BackApiDjango
**Repository Path**: huacuoyu/back-api-django
## Basic Information
- **Project Name**: BackApiDjango
- **Description**: 该项目包含完整的 Django 主体功能模块(分离项目API, 全栈项目页面)。Django是python开发者最信赖的框架,安全,稳定,易于上手!
- **Primary Language**: Python
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 1
- **Created**: 2022-08-29
- **Last Updated**: 2022-08-29
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
### 一、项目介绍
#### 1.模板简介
该项目包含完整的 Django 主体功能模块(分离项目API, 全栈项目页面)。Django是python开发者最信赖的框架,安全,稳定,易于上手!
#### 2.博客文章
- **Django学习:https://blog.csdn.net/qq_50792097/article/details/126565005**
- **API测试接口:https://www.showdoc.com.cn/behindAPI/9284097676157717**
#### 3.模板架构
**1.API接口模板**
```
WebServe--djangoApi API接口项目
│ db.sqlite3
│ django-graduate.sql sql文件
│ manage.py 启动器
│ requirements.txt 依赖包
├─myhome 应用程序代码
│ │ admin.py
│ │ apps.py
│ │ models.py 模型
│ │ __init__.py
│ ├─middleware 中间件
│ │ LoginCheckMiddleware.py 登录中间件
│ │ __init__.py
│ ├─migrations 映射
│ │ __init__.py
│ ├─routes 自定义封装路由
│ │ IndexUrls.py
│ │ __init__.py
│ ├─utils 工具函数
│ │ func.py
│ │ __init__.py
│ ├─views 视图函数(类似于控制器)
│ │ AdminViews.py 封装Admin
│ │ IndexViews.py 封装Index
│ │ StudentViews.py 封装Student
│ │ TeacherViews.py 封装Teacher
│ │ __init__.py
├─static 公有访问静态资源文件
│ ├─assets 保存的文件路径
│ │ └─file
│ │ 1657051206.909655.jpg
│ │ 1657065859.9794888.jpg
│ │ 1657081535.9102411.jpg
│ ├─css 公有样式
│ │ comm.css
│ ├─images 公有图片
│ │ bg-login.png
│ │ bg-main.png
│ │ bg-white.png
│ │ logo.png
│ │ logo2.png
│ │ logo3.png
│ ├─js 公有js
│ │ index.js
│ └─lib 公有类库
│ ├─admin-assets
│ ├─JQuery3.6.0
│ └─layui-v2.6.8
├─templates 模板视图
│ │ 404error.html 404空页面
│ │ index.html 首页
│ │ login.html 登录页
│ │ register.html 注册页
│ ├─admin 管理员相关页面
│ │ index.html
│ │ student_list.html
│ │ teacher_list.html
│ │ title_list.html
│ ├─public 公有页面
│ │ aside.html
│ │ header.html
│ │ script.html
│ │ style.html
│ │ theme.html
│ ├─student 学生相关页面
│ │ graduate_answer.html
│ │ graduate_article.html
│ │ group.html
│ │ index.html
│ │ middle_check.html
│ │ select_title.html
│ │ title_msg.html
│ └─teacher 教师相关页面
│ design_title.html
│ graduate_answer.html
│ graduate_article.html
│ group.html
│ index.html
│ middle_check.html
│ student_score.html
│ title_msg.html
├─tests 自定义测试文件夹
│ index.py
├─web_template 模板文件
└─WebServer 项目配置项
│ asgi.py
│ settings.py 设置
│ urls.py 路由入口
│ wsgi.py 项目启动
└─ __init__.py
```
**2.全栈后台管理系统**
```
WebServe--djangoAdmin Larvel后台管理项目
WebServer--graduate Django全栈系统
│ db.sqlite3
│ django-graduate.sql sql文件
│ manage.py 启动器
│ requirements.txt 依赖包
├─myhome 应用程序代码
│ │ admin.py
│ │ apps.py
│ │ models.py 模型
│ │ __init__.py
│ ├─middleware 中间件
│ │ LoginCheckMiddleware.py 登录中间件
│ │ __init__.py
│ ├─migrations 映射
│ │ __init__.py
│ ├─routes 自定义封装路由
│ │ IndexUrls.py
│ │ __init__.py
│ ├─utils 工具函数
│ │ func.py
│ │ __init__.py
│ ├─views 视图函数(类似于控制器)
│ │ AdminViews.py 封装Admin
│ │ IndexViews.py 封装Index
│ │ StudentViews.py 封装Student
│ │ TeacherViews.py 封装Teacher
│ │ __init__.py
├─static 公有访问静态资源文件
│ ├─assets 保存的文件路径
│ │ └─file
│ │ 1657051206.909655.jpg
│ │ 1657065859.9794888.jpg
│ │ 1657081535.9102411.jpg
│ ├─css 公有样式
│ │ comm.css
│ ├─images 公有图片
│ │ bg-login.png
│ │ bg-main.png
│ │ bg-white.png
│ │ logo.png
│ │ logo2.png
│ │ logo3.png
│ ├─js 公有js
│ │ index.js
│ └─lib 公有类库
│ ├─admin-assets
│ ├─JQuery3.6.0
│ └─layui-v2.6.8
├─templates 模板视图
│ │ 404error.html 404空页面
│ │ index.html 首页
│ │ login.html 登录页
│ │ register.html 注册页
│ ├─admin 管理员相关页面
│ │ index.html
│ │ student_list.html
│ │ teacher_list.html
│ │ title_list.html
│ ├─public 公有页面
│ │ aside.html
│ │ header.html
│ │ script.html
│ │ style.html
│ │ theme.html
│ ├─student 学生相关页面
│ │ graduate_answer.html
│ │ graduate_article.html
│ │ group.html
│ │ index.html
│ │ middle_check.html
│ │ select_title.html
│ │ title_msg.html
│ └─teacher 教师相关页面
│ design_title.html
│ graduate_answer.html
│ graduate_article.html
│ group.html
│ index.html
│ middle_check.html
│ student_score.html
│ title_msg.html
├─tests 自定义测试文件夹
│ index.py
├─web_template 模板文件
└─WebServer 项目配置项
│ asgi.py
│ settings.py 设置
│ urls.py 路由入口
│ wsgi.py 项目启动
└─ __init__.py
```
#### 4.模板截图
**1.API接口系统**
| | |
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|  |  |
|  |  |
|  |  |
|  |  |
|  |  |
| .jpg "屏幕截图.png") |  |
**2.后台管理系统**
| | |
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|  |  |
|  |  |
### 二、项目安装
#### 1.开始使用
使用git拉取当前项目
```
git clone https://gitee.com/MiniWildCat/back-api-django.git
```
使用pip3 对 django系统安装包
```
django接口模板系统/django后台管理系统
pip install -r requirements.txt
```
运行项目
```
django接口模板系统/django后台管理系统
python manage.py runserver 8080
```
项目开启后,可以通过以下url访问
```
django接口模板系统/django后台管理系统
http://localhost:8080/
```
默认帐号
```
用户名:admin
密码:123456
```
#### 2.使用说明
1. 项目的架构可以下载使用!
3. 经过本项目二次开发的项目,本项目不承担任何法律责任!!!
#### 3.开源许可
当前项目模板采用 [Apache 2.0](http://www.apache.org/licenses/) 开源许可证。