摘要:        
``` /*======== 全局 ========*/
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, p, blockquote, th, td { margin:0; padding:0; }
body { font-size:12px; color:#666; f...    阅读全文
posted @ 2018-05-08 23:18
Rocin
阅读(192)
评论(0)
推荐(0)
        
            
        
        
摘要:        
1. img插入图片,用的最多,比如产品展示类 2. 背景图片一般用于小图标背景或者超大背景图片    阅读全文
posted @ 2018-05-08 23:17
Rocin
阅读(16981)
评论(0)
推荐(0)
        
            
        
        
摘要:        
1. 文字水平居中是 text align: center 2. 盒子水平居中 左右margin 改为 auto 2.1 必须是块级元素 2.2 盒子必须制定了width 3. 让定位position的盒子水平居中 原理和例子1看http://www.cnblogs.com/allen2333/p/    阅读全文
posted @ 2018-05-08 23:08
Rocin
阅读(223)
评论(0)
推荐(0)
        
            
        
        
摘要:        
请求都封装在request对象里面了    阅读全文
posted @ 2018-05-08 22:12
Rocin
阅读(117)
评论(0)
推荐(0)
        
            
        
        
摘要:        
1. 带领茅台经历计划经济与经济危机,茅台最终成为全球市值最大的酒类品牌。 2. 多苦多累、流血流汗不要讲,我不问过程,我只要结果。    阅读全文
posted @ 2018-05-08 16:35
Rocin
阅读(118)
评论(0)
推荐(0)
        
            
        
        
摘要:        
一. flask在哪里找模板? 1. from flask import Flask 2. 从Flask中查看源码,会跳转到app.py,app.py里有class Flask,class Flask里面有__init__ 3. 从源码可见,默认模板路径是当前路径的templates目录 4. fr    阅读全文
posted @ 2018-05-08 15:09
Rocin
阅读(225)
评论(0)
推荐(0)
        
            
        
        
摘要:        
一. 配置文件 flask中的配置文件是一个flask.config.Config对象(继承字典),默认配置为 方法1,不常用 方法2 方法3,常用,app.config.from_object("python类或类的路径") settings.py hello.py https://github.    阅读全文
posted @ 2018-05-08 15:09
Rocin
阅读(145)
评论(0)
推荐(0)
        
            
        
        
摘要:        
一. 路由和响应函数(View function)的映射是通过装饰器实现的 1. 2. app.route源码 def route(self, rule, options): """A decorator that is used to register a view function for a     阅读全文
posted @ 2018-05-08 15:08
Rocin
阅读(207)
评论(0)
推荐(0)
        
            
        
        
摘要:        
一. flask依赖wsgi,实现wsgi的模块:wsgiref(django),werkzeug(flask),uwsgi 1. werkzeug示例 2. wsgiref示例: 3. 本质的本质 socket 4. app.run()中的run方法源码 def run(self, host=No    阅读全文
posted @ 2018-05-08 15:07
Rocin
阅读(2288)
评论(0)
推荐(0)
        
            
        
        
摘要:        
方法1 1. FLASK_APP=hello.py flask run 方法2 1. export FLASK_APP=hello.py 2. export FLASK_DEBUG=1 3. flask run port=9999 方法3 1. app.run() 方法4,同一个内网可以访问    阅读全文
posted @ 2018-05-08 08:53
Rocin
阅读(5979)
评论(0)
推荐(2)
        
 
                    
                     
                    
                 
                    
                
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号