会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
ianduin
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
下一页
2018年3月14日
python3.6 SSL module is not available
摘要: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.Collecting requests Could not fetch URL https
阅读全文
posted @ 2018-03-14 21:04 ianduin
阅读(8244)
评论(1)
推荐(0)
2018年3月13日
django amdin页面下拉列表的外键增加条件过滤
摘要: class MenuList(admin.ModelAdmin): list_display = ('menuId', 'menuName', 'menuDesc', 'menuType', 'sort_order') def formfield_for_foreignkey(self, db_fi
阅读全文
posted @ 2018-03-13 17:29 ianduin
阅读(1113)
评论(0)
推荐(0)
python接口自动化测试框架实现之字符串插入变量(字符串参数化)
摘要: 问题: 在做接口自动化测试的时候,请求报文是json串,但是根据项目规则必须转换成字符串,然后在开头拼接“data=” 接口中很多入参值需要进行参数化。 解决方案: 1、Python并没有对在字符串中简单替换变量值提供直接的支持。 但是通过使用字符串的 format() 方法来解决这个问题。比如:
阅读全文
posted @ 2018-03-13 14:40 ianduin
阅读(1808)
评论(0)
推荐(0)
python接口自动化测试框架实现之操作oracle数据库
摘要: python操作oracle数据库需要使用到cx-oracle库。 安装:pip install cx-oracle python连接oracle数据库分以下步骤: 1、与oracle建立连接; 2、获取游标; 3、执行sql语句; 4、fetch查询结果或commit修改结果; 5、关闭游标; 6
阅读全文
posted @ 2018-03-13 14:39 ianduin
阅读(1468)
评论(0)
推荐(0)
python接口自动化测试框架实现之操作mysq数据库
摘要: python操作mysql数据库需要使用到mysqlclient库。 安装:pip install mysqlclient python连接mysql数据库分以下步骤: 1、与mysql建立连接; 2、获取游标; 3、执行sql语句; 4、fetch查询结果或commit修改结果; 5、关闭游标;
阅读全文
posted @ 2018-03-13 14:38 ianduin
阅读(1529)
评论(0)
推荐(0)
2018年3月5日
CentOS7 修改yum源为阿里云
摘要: 1,登陆root帐号 2,cd /etc/yum.repo.d 3,mv CentOS-Base.repo CentOS-Base.repo.bak4,wget http://mirrors.aliyun.com/repo/Centos-7.repo5,mv Centos-7.repo CentOS
阅读全文
posted @ 2018-03-05 22:47 ianduin
阅读(9415)
评论(0)
推荐(0)
python mysql查询结果乱码
摘要: 在connect()方法中传入charset='utf8'参数即可。
阅读全文
posted @ 2018-03-05 17:57 ianduin
阅读(215)
评论(0)
推荐(0)
python配置文件读取
摘要: python配置文件读取
阅读全文
posted @ 2018-03-05 17:47 ianduin
阅读(5633)
评论(0)
推荐(1)
python/django将mysql查询结果转换为字典组
摘要: 使用python查询mysql数据库的时候,默认查询结果没有返回表字段名称,不方便使用。为了方便使用一般会选择将查询结果加上字段名称以字典组的方式返回查询结果。 实现如下: 详细原理参考:https://docs.djangoproject.com/en/2.0/topics/db/sql/#exe
阅读全文
posted @ 2018-03-05 17:36 ianduin
阅读(5578)
评论(0)
推荐(0)
2018年3月4日
centos系统下禁用笔记本触控板
摘要: centos笔记本触控板失效
阅读全文
posted @ 2018-03-04 18:39 ianduin
阅读(407)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
下一页
公告