update readme.md
This commit is contained in:
@@ -40,7 +40,6 @@ Pear Admin Flask 基于 Flask 生态的后台管理系统,该项目旨在为 p
|
|||||||
+ [flask](https://dormousehole.readthedocs.io/en/latest/)
|
+ [flask](https://dormousehole.readthedocs.io/en/latest/)
|
||||||
+ [flask-login](https://flask-login.readthedocs.io/en/latest/)
|
+ [flask-login](https://flask-login.readthedocs.io/en/latest/)
|
||||||
+ [flask-sqlalchemy](http://www.pythondoc.com/flask-sqlalchemy/quickstart.html)
|
+ [flask-sqlalchemy](http://www.pythondoc.com/flask-sqlalchemy/quickstart.html)
|
||||||
+ [flask-restful](https://flask-restful.readthedocs.io/en/latest/)
|
|
||||||
|
|
||||||
|
|
||||||
## 预览
|
## 预览
|
||||||
@@ -52,7 +51,7 @@ Pear Admin Flask 有以下几个版本:
|
|||||||
|
|
||||||
[Mini 分支版本 ](https://gitee.com/pear-admin/pear-admin-flask/tree/mini/)
|
[Mini 分支版本 ](https://gitee.com/pear-admin/pear-admin-flask/tree/mini/)
|
||||||
|
|
||||||
>flask 2.x + flask-sqlalchemy + Flask-restful + 基于角色的权限管理
|
>flask 2.x + flask-sqlalchemy + 基于角色的权限管理
|
||||||
|
|
||||||
| | |
|
| | |
|
||||||
|---------------------|---------------------|
|
|---------------------|---------------------|
|
||||||
|
|||||||
@@ -5,13 +5,12 @@ from flask_login import current_user, logout_user, login_required
|
|||||||
|
|
||||||
from common.gen_captcha import get_captcha_image
|
from common.gen_captcha import get_captcha_image
|
||||||
|
|
||||||
# 获取验证码
|
|
||||||
|
|
||||||
index_bp = Blueprint('index', __name__)
|
index_bp = Blueprint('index', __name__)
|
||||||
|
|
||||||
|
|
||||||
@index_bp.route('/')
|
@index_bp.route('/')
|
||||||
@index_bp.route('/admin')
|
@index_bp.route('/admin')
|
||||||
|
@login_required
|
||||||
def index():
|
def index():
|
||||||
return render_template('index.html')
|
return render_template('index.html')
|
||||||
|
|
||||||
|
|||||||
@@ -35,11 +35,11 @@ REDIS_HOST = "127.0.0.1"
|
|||||||
REDIS_PORT = 6379
|
REDIS_PORT = 6379
|
||||||
|
|
||||||
""" Sqlalchemy 配置 """
|
""" Sqlalchemy 配置 """
|
||||||
# SQLALCHEMY_DATABASE_URI = r'sqlite:///pear_admin.db'
|
SQLALCHEMY_DATABASE_URI = r'sqlite:///pear_admin.db'
|
||||||
SQLALCHEMY_TRACK_MODIFICATIONS = True
|
SQLALCHEMY_TRACK_MODIFICATIONS = True
|
||||||
SQLALCHEMY_ECHO = False
|
SQLALCHEMY_ECHO = False
|
||||||
SQLALCHEMY_POOL_RECYCLE = 8
|
SQLALCHEMY_POOL_RECYCLE = 8
|
||||||
SQLALCHEMY_DATABASE_URI = f"mysql+pymysql://{MYSQL_USERNAME}:{MYSQL_PASSWORD}@{MYSQL_HOST}:{MYSQL_PORT}/{MYSQL_DATABASE}"
|
# SQLALCHEMY_DATABASE_URI = f"mysql+pymysql://{MYSQL_USERNAME}:{MYSQL_PASSWORD}@{MYSQL_HOST}:{MYSQL_PORT}/{MYSQL_DATABASE}"
|
||||||
|
|
||||||
LOG_LEVEL = logging.ERROR
|
LOG_LEVEL = logging.ERROR
|
||||||
|
|
||||||
|
|||||||
@@ -77,9 +77,10 @@
|
|||||||
let $ = layui.jquery;
|
let $ = layui.jquery;
|
||||||
let dtree = layui.dtree;
|
let dtree = layui.dtree;
|
||||||
|
|
||||||
|
// TODO 加载修改是会卡死
|
||||||
dtree.renderSelect({
|
dtree.renderSelect({
|
||||||
elem: '#selectParent',
|
elem: '#selectParent',
|
||||||
url: '/api/v1/dept/department',
|
url: '/api/v1/dept/department/',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
selectInputName: {nodeId: 'deptId', context: 'deptName'},
|
selectInputName: {nodeId: 'deptId', context: 'deptName'},
|
||||||
skin: 'layui',
|
skin: 'layui',
|
||||||
|
|||||||
Reference in New Issue
Block a user