本文是关于Flask-Admin库的快速入门,手把手带你一起学习。
手把手搭建Web网站
Flask-Admin是一个功能齐全、简单易用的Flask扩展,让你可以为Flask应用程序增加管理界面。它受django-admin包的影响,但用这样一种方式实现,开发者拥有最终应用程序的外观、感觉和功能的全部控制权。
内容
- 01_搭建工作记录管理系统的准备工作
- 02_调整网站色调为蓝色
- 03_添加一个静态页面
- 04_网站从英文改为中文
- 05_使用MySQL数据库存放数据
- 06_展示数据库表单
- 07_新增登陆界面
- 08_展示数据库指定的列
- 09_开启导出表格功能
- 10-使用模板
- 11-修改Flask_admin前端页面表格一行显示文字不换行
- 12-修改Flask_admin前端页面添加表格名称
- 13-修改Flask_admin前端表格通过js计算生成合计行
重点模块
模块名 | 简介 |
---|---|
Flask_admin | As a micro-framework, Flask lets you build web services with very little overhead. It offers freedom for you, the designer, to implement your project in a way that suits your particular application. |
Flask-SQLAlchemy | Flask-SQLAlchemy is an extension for Flask that adds support for SQLAlchemy to your application. It aims to simplify using SQLAlchemy with Flask by providing useful defaults and extra helpers that make it easier to accomplish common tasks. |
Flask-BabelEx | Flask-BabelEx is an extension to Flask that adds i18n and l10n support to any Flask application with the help of babel, pytz and speaklater. It has builtin support for date formatting with timezone support as well as a very simple and friendly interface to gettext translations. |
WTForms | With WTForms, your form field HTML can be generated for you, but we let you customize it in your templates. This allows you to maintain separation of code and presentation, and keep those messy parameters out of your python code. Because we strive for loose coupling, you should be able to do that in any templating engine you like, as well. |
Flask-Login | Flask-Login 为 Flask 提供了用户会话管理。它处理了日常的登入,登出并且长时间记住用户的会话。 |