Giter Club home page Giter Club logo

flask_web_app's Introduction

flask_web_app

flask walking through

程序的基本结构

共3大部分

  1. 初始化
  2. 路由和视图函数
  3. 启动服务器

设计理念--工作方式

  • 请求和响应 请求和响应_请求钩子

扩展

社交博客程序 index

  • 用户认证
    • Flask的认证扩展
    • 密码安全性
    • 创建认证蓝本
    • 使用Flask-Login认证用户
    • 注册新用户
    • 确认账户
    • 管理账户
  • 用户角色
    • 角色在数据库中的表示
    • 赋予角色
    • 角色验证
  • 用户资料
    • 资料信息
    • 用户资料页面
    • 资料编辑器
    • 用户头像
  • 博客文章
    • 提交和显示博客文章
    • 在资料页中显示博客文章
    • 分页显示长博客列表
    • 使用Markdown和Flask-PageDown支持富文本文章
    • 博客文章的固定链接
    • 博客文章编辑器
  • 关注者
    • 再论数据库关系
    • 在资料也中显示关注者
    • 使用数据库联结查询锁关注用户的文章
    • 在首页显示所关注用户的文章
  • 用户评论
    • 评论在数据库中的表示
    • 提交和显示评论
    • 管理评论
  • 应用编程接口
    • REST 简介
    • 使用Flask提供REST web服务

flask 项目结构

对 flask 项目的说明,

文件夹说明
  • flask 程序一般都保存在名为 app 的包中
  • migrations 文件夹包含数据库迁移脚本
  • tests 文件夹包含单元测试
  • venv 文件夹包含 python 虚拟环境
文件说明
  • requirements.txt 列出了所有依赖包,便于在其他电脑中重新生成相同的虚拟环境
  • config.py 存储配置
  • manage.py 用于启动程序以及其他的程序任务。

flask_web_app's People

Contributors

slyrx avatar

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.