Code Monkey home page Code Monkey logo

flaskblog's Introduction

title tags grammar_cjkRuby
MarsBlog
python,flask,博客
true

很久之前就想着自己做一个博客,能力有限一直拖着,当然现在能力也还是有限,所以实现的效果还有很多需要提高的地方。放在github上希望能一起学习,一起进步~~

更新日志


2017.2.2

1、博客架构

该博客使用flask框架搭建,博客架构为

  • 首页 HOME
  • 分类 Category
  • 标签 Tag
  • 关于 About
  • 编辑文章 Edit
  • 登录\登出 Login\Logout

2、开发环境

  • python3.4
  • Windows10(没钱买mac,没有讽刺Windows的意思啊~~)
  • sublime text3
  • Pycharm Pro(用了学校邮箱,免费的,吼吼)
  • Chrome
  • cmder (良心推荐,比Windows自带命令行好一万倍。)

cmder

  • python包含的库

flask flask-login==0.2.11 flask-mail flask-sqlalchemy sqlalchemy-migrate flask-wtf markdown flask-markdown

可使用pip命令安装

pip install -r requirements.txt

3、代码结构

4、运行代码

$ venv3\script\activate
$ (venv3)python run.py

5、已实现功能

  • 1) 关于页面(About) 使用bootstrap模板,自我感觉还不错。

about 参考:Kelvin – Resume Theme

  • 2) 编辑页面(Edit) flask-markdown模块用了好久都不行,所以使用editormd插件,非常方便。存储数据库的时候文章内容存储的是markdown的格式,需要显示页面的时候只需导入markdown模块即可,用法如下:
markdown_text = "# 一级标题"

import markdown
html_text = markdown.markdown(markdown_text)

edit

参考:Flask实现Markdown在线编辑与解析

  • 3) 登录登出页面 使用flask-login模块,确实好用,但是初次接触感觉有点麻烦,以后再慢慢深入学习吧。

login

参考:用户登录

flaskblog's People

Contributors

marsggbo avatar

Watchers

 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.