zoukankan      html  css  js  c++  java
  • python+flask搭建个人博客2---项目结构及初始化

    一、项目结构

    二、初始化配置、工厂函数、表单等

    1. 编写配置文件:settings.py
    2. 拓展实例化:extensions.py
    3. 创建数据库模型:models.py
    4. 生成虚拟数据:fakes.py
    5. 构建__init__.py
    6. 新建.flaskenv文件
    7. 初步运行程序
    8. 定义博客表单:forms.py
    9. 辅助函数文件:utils.py

    三、博客前台页面

    1. 基模板:base.html
    2. 文章列表显示局部模板:_post.html(templates/blog/_post.html)
    3. 博客主页Index.html和分页详情页category.html(templates/blog/xx.html)(bluemaps/blog.py)
    4. 文章详情页post.html(templates/blog/post.html)(bluemaps/blog.py)
    5. 登录页面和登出login.html(templates/blog/login.html)(bluemaps/login.py)

    四、博客后台管理

    1. 文章管理
      • 新增文章:new_post.html  (templates/admin/new_post.html)(bluemaps/admin.py)
      • 管理文章:manage_post.html (templates/admin/manage_post.html)(bluemaps/admin.py)  
      • 编辑文章:edit_post.html (templates/admin/edit_post.html)(bluemaps/admin.py)
      • 上传图片设置:admin.py  (bluemaps/admin.py)
    2. 博客设置:settings.html (templates/admin/settings.html)(bluemaps/admin.py)
    3. 评论管理:manage_comment.html (templates/admin/manage_comment.html)(bluemaps/admin.py)
    4. 分类管理
      • 新增分类:new_category.html (templates/admin/new_category.html)(bluemaps/admin.py)
      • 分类管理页面:manage_categroy.html (templates/admin/manage_categroy.html)(bluemaps/admin.py)
      • 编辑分类:edit_category.html (templates/admin/edit_category.html)(bluemaps/admin.py)
      • 删除分类: (Category模型类中添加delete()方法)    (bluemaps/admin.py)
         
  • 相关阅读:
    个人工作总结2
    个人工作总结1
    各种颜色代码
    第七周学习进度
    安卓的SlidingMenu配置
    第六周学习进度
    ecshop 首页调用指定分类下的销售排行
    EcShop首页显示特定分类的精品新品热销特价等推荐商品
    ecshop调用指定分类热销-新品-精品
    ecshop transport.js 和 jquery 冲突解决办法
  • 原文地址:https://www.cnblogs.com/ybbybb/p/14339038.html
Copyright © 2011-2022 走看看