Hello World

摘要: 方式二:用模板语言 - get_server_status_id_display( ); #局限性:条件必须是对象QuerySet[对象,对象] 代码: def test(request): """ 模板语言显示 choice :param request: :return: """ server_ 阅读全文
posted @ 2017-10-12 23:38 nayike 阅读(262) 评论(0) 推荐(0) 编辑
摘要: 参数一: 参数二: 格式化: 问题:如果要有 多个name,kwargs 进行替换? 引出: JS原型:为类增加方法,以后所有对象都可调用 整合: 阅读全文
posted @ 2017-10-12 23:09 nayike 阅读(3275) 评论(0) 推荐(0) 编辑
摘要: import xlrd path = 'F:\\file.xlsx' print(path) #1.打开文件 data = xlrd.open_workbook(path) print(data) #2.查询工作表 sheets = data.sheets() #可以通过 函数,索引,名称 获得工作列表 sheet_1_by_function = data.sheets()[0... 阅读全文
posted @ 2017-10-12 22:06 nayike 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 一.autohome import requests from bs4 import BeautifulSoup response = requests.get('http://www.autohome.com.cn/news') response.encoding = 'gbk' soup = B 阅读全文
posted @ 2017-10-12 01:38 nayike 阅读(333) 评论(0) 推荐(0) 编辑

Hello