摘要: **Step 6:** 模板 1.layout.html Flaskr Flaskr {% if not session.logged_in %} log in {% else %} log o... 阅读全文
posted @ 2015-05-04 15:48 小米飞猫 阅读(727) 评论(0) 推荐(0) 编辑
摘要: **Step 5:** 视图函数 1.显示条目 @app.route('/') def show_entries(): cur = g.db.execute('select title, text from entries order by id desc') ... 阅读全文
posted @ 2015-05-04 15:37 小米飞猫 阅读(789) 评论(0) 推荐(0) 编辑
摘要: **Step 1:** 目录结构 /flaskr /static /templates**Step 2:** 创建配置文件创建`flaskr/config.py`文件,配置相关的参数。 # configuration DATABASE = '/tmp/f... 阅读全文
posted @ 2015-05-04 14:07 小米飞猫 阅读(933) 评论(0) 推荐(0) 编辑