1 Star 0 Fork 946

lucasysfeng / Pear Admin Flask

forked from Pear Admin / Pear Admin Flask 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT
# 初 始 化 数 据 库
flask db init
flask db migrate
flask db upgrade
flask admin init

# windows改为bat
./run.sh

新建页面

  1. templates下建页面
  2. system/init.py 建blueprint
  3. system下加view
  4. 权限管理加页面 (参考已有的,写错了就404)
  5. 角色管理
  6. 前端清缓存, 后台重启,或换浏览器试下。 如果404,把上面都检查下。

新建model

  1. models下建model
  2. models/init.py加类。
  3. schemas增加schema.
  4. flask db migrate flask db upgrade

新建按钮权限

  1. 权限管理---新增按钮权限。
  2. 在html代码里写对应标识
    {% if authorize("system:company:toudi") %}
        <button class="pear-btn pear-btn-primary pear-btn-sm" lay-event="toudi">
            <i class="pear-icon">通过审核</i>
        </button>
    {% endif %}
  1. 角色管理中授权
MIT License Copyright (c) 2021 mkg Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

🌶 基于 Flask 生态,权限,快速开发平台 展开 收起
Python
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Python
1
https://gitee.com/lucasysfeng/pear-admin-flask.git
git@gitee.com:lucasysfeng/pear-admin-flask.git
lucasysfeng
pear-admin-flask
Pear Admin Flask
master

搜索帮助