上一页 1 2 3 4 5 6 7 8 ··· 16 下一页
摘要: logging.getLogger(name=None)Return a logger with the specified name or, if name is None, return a logger which is the root logger of the hierarchy. If 阅读全文
posted @ 2018-09-30 11:57 zxpo 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 这个符号(#!)的名称,叫做"Shebang"或者"Sha-bang"Shebang这个符号通常在Unix系统的脚本中第一行开头中写到,它指明了执行这个脚本文件的解释程序。如果脚本文件中没有#!这一行,那么它执行时会默认用当前Shell去解释这个脚本(即:$SHELL环境变量)。#encoding= 阅读全文
posted @ 2018-09-30 11:53 zxpo 阅读(227) 评论(0) 推荐(0) 编辑
摘要: [应用]一个 Flask 应用是一个 Flask 类的实例。可以在一个被称为应用工厂的函数内部创建 Flask实例。所有应用相关的配置、注册和其他设置都会在函数内部完成,然后返回这个应用。__init__.py 有两个作用:一是包含应用工厂;二是 告诉 Python 应用文件夹应当视作为一个包。__ 阅读全文
posted @ 2018-09-30 11:51 zxpo 阅读(194) 评论(0) 推荐(0) 编辑
摘要: js客户端发送 {'op':'descrip', 100} python服务端收到的为 dict, 回复客户端可以用emit(str(json.dumps(dict)), room=roomname) js客户端收到后,可以用jsonobj = $.parseJSON(data) 阅读全文
posted @ 2018-09-18 19:47 zxpo 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 个基模板定义了12个block, 分别对应了整个文档(doc),html属性(html_attribs),整个html(html),整个head部分(head),title部分(title),meta代码部分(metas),css样式(styles),body属性(body_attribs),bod 阅读全文
posted @ 2018-09-18 19:40 zxpo 阅读(240) 评论(0) 推荐(0) 编辑
摘要: from flask import current_app, gg is a special object that is unique for each request. It is used to store data that might be accessed by multiple fun 阅读全文
posted @ 2018-09-15 15:54 zxpo 阅读(1352) 评论(0) 推荐(0) 编辑
摘要: Command Line Interface Installing Flask installs the flask script, a Click command line interface, in your virtualenv. Executed from the terminal, thi 阅读全文
posted @ 2018-09-15 15:27 zxpo 阅读(438) 评论(0) 推荐(0) 编辑
摘要: Flask 0.8 introduces instance folders. Flask for a long time made it possible to refer to paths relative to the application’s folder directly (via Fla 阅读全文
posted @ 2018-09-15 15:16 zxpo 阅读(1908) 评论(0) 推荐(0) 编辑
摘要: Python 3 comes bundled with the venv module to create virtual environments Create an environment Create a project folder and a venv folder within: mkd 阅读全文
posted @ 2018-09-15 14:35 zxpo 阅读(1176) 评论(0) 推荐(0) 编辑
摘要: 1、flask默认的静态文件和html文件在app应用文件夹里的相应文件夹下:app // Flask||--static ||--templates |静态文件默认的url地址为:url_prefix of app + /static 如:/chat/static/xxx.ico静态文件默认存放文 阅读全文
posted @ 2018-09-15 12:28 zxpo 阅读(344) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 16 下一页