Giter VIP home page Giter VIP logo

flask_manager's Introduction

flask_manager

基于flask的web管理框架

简介

flask_manager是一个基于flask-adminlte-scaffold 改进而来的简单后台管理系统。

主要将flask-adminlte-scaffold中的orm由peewe替换为sqlalchemy并精简了一些代码。

  • 菜单管理功能,通过后台就可以自己添加菜单
  • 个人中心,增加二次验证功能

安装方式

git clone https://github.com/block-cat/flask_manager.git

然后安装依赖:

pip install -r requirements.txt

配置文件

config.ini

初始化数据库

python3 manage.py db init
python3 manage.py db upgrade
python3 manage.py db mirgate

初始化用户

以pg为例

insert into "user" (username,password,fullname,email,phone,status) values ('admin','pbkdf2:sha256:50000$99JpNyzo$74d2e66765e6396d626822bc80100749afd4489cc0a4fe7e8e97394f1801e996','admin','[email protected]','123','t');

启动

python __init__.py

通用管理后台

快速创建可以编辑查询的数据模型

创建模型

  1. 首先在model文件夹下创建model文件,在__init__.py文件中引入。
  2. models的定义中添加__routename__用于指定路由前缀(需要使用通用管理模型的类使用,不适用通用管理模型的类可以不添加)

创建表单

  1. 在main文件夹下创建与前面创建模型对应的表单,并使用同样的__routename__指定路由
  2. 在views文件中,引入数据模型

手动创建菜单

启动系统后,在菜单管理中,手动创建菜单

flask_manager's People

Contributors

jellyfrank avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

flask_manager's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.