博客园 - MAU
uuid:24b78886-0ed1-41c2-8670-e3f31dcf42c4;id=189731
2022-11-20T13:38:45Z
MAU
https://www.cnblogs.com/polly-ling/
feed.cnblogs.com
https://www.cnblogs.com/polly-ling/p/16880909.html
Pytest 目录 - MAU
目录 初识快速入门 函数方法 固件 内置固件 参考链接: https://learning-pytest.readthedocs.io/zh/latest/doc https://docs.python.org/zh-cn/3/reference/ 官方链接: https://docs.pytest
2022-11-11T09:31:00Z
2022-11-11T09:31:00Z
MAU
https://www.cnblogs.com/polly-ling/
【摘要】目录 初识快速入门 函数方法 固件 内置固件 参考链接: https://learning-pytest.readthedocs.io/zh/latest/doc https://docs.python.org/zh-cn/3/reference/ 官方链接: https://docs.pytest <a href="https://www.cnblogs.com/polly-ling/p/16880909.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/polly-ling/p/16879855.html
pytest--测试函数 - MAU
参考链接 https://docs.python.org/zh-cn/3/reference/simple_stmts.html?highlight=assert#grammar-token-assert_stmt 断言 assert 在 pytest 中,assert 是编写测试的最基础工具。如
2022-11-11T06:59:00Z
2022-11-11T06:59:00Z
MAU
https://www.cnblogs.com/polly-ling/
【摘要】参考链接 https://docs.python.org/zh-cn/3/reference/simple_stmts.html?highlight=assert#grammar-token-assert_stmt 断言 assert 在 pytest 中,assert 是编写测试的最基础工具。如 <a href="https://www.cnblogs.com/polly-ling/p/16879855.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/polly-ling/p/16879733.html
pytest --快速入门 - MAU
参考文档 https://learning-pytest.readthedocs.io/zh/latest/ 环境安装 pip install pytest 检查安装 pytest --version 用例编写 用例默认识别规则 用例文件:所有文件名为test_开头 或者 _test 开头的文件会被
2022-11-11T02:47:00Z
2022-11-11T02:47:00Z
MAU
https://www.cnblogs.com/polly-ling/
【摘要】参考文档 https://learning-pytest.readthedocs.io/zh/latest/ 环境安装 pip install pytest 检查安装 pytest --version 用例编写 用例默认识别规则 用例文件:所有文件名为test_开头 或者 _test 开头的文件会被 <a href="https://www.cnblogs.com/polly-ling/p/16879733.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/polly-ling/p/11810724.html
Django admin 外键关联默认显示用户的username - MAU
使用默认User表.默认显示用户username,转换成get_full_name() 添加 str 方法 暂时没发现异常,有异常在更新
2019-11-07T02:58:00Z
2019-11-07T02:58:00Z
MAU
https://www.cnblogs.com/polly-ling/
【摘要】使用默认User表.默认显示用户username,转换成get_full_name() 添加 str 方法 暂时没发现异常,有异常在更新 <a href="https://www.cnblogs.com/polly-ling/p/11810724.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/polly-ling/p/11549021.html
局部加载样式 - MAU
点击按钮加载页面等待的图标
2019-09-19T05:50:00Z
2019-09-19T05:50:00Z
MAU
https://www.cnblogs.com/polly-ling/
【摘要】点击按钮加载页面等待的图标 <a href="https://www.cnblogs.com/polly-ling/p/11549021.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/polly-ling/p/10175510.html
Django - 数据按年月日查找 - MAU
views html Django中条件过滤:按时间筛选 参考链接 "Django中条件过滤:按时间筛选"
2018-12-25T09:53:00Z
2018-12-25T09:53:00Z
MAU
https://www.cnblogs.com/polly-ling/
【摘要】views html Django中条件过滤:按时间筛选 参考链接 "Django中条件过滤:按时间筛选" <a href="https://www.cnblogs.com/polly-ling/p/10175510.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/polly-ling/p/10144693.html
Python xlrd xlwt 读取写入Excel. drf 下载Excel模板, 读取Excel - MAU
import xlrd import xlwt #读取 xlrd.Book.encoding = "gbk" wb = xlrd.open_workbook(filename='sfp.xlsx', ) table = wb.sheets()[3] nrows = table.nrows for k
2018-12-19T09:29:00Z
2018-12-19T09:29:00Z
MAU
https://www.cnblogs.com/polly-ling/
【摘要】import xlrd import xlwt #读取 xlrd.Book.encoding = "gbk" wb = xlrd.open_workbook(filename='sfp.xlsx', ) table = wb.sheets()[3] nrows = table.nrows for k <a href="https://www.cnblogs.com/polly-ling/p/10144693.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/polly-ling/p/10120628.html
Django--缓存设置 - MAU
Django缓存机制 一. 缓存介绍 缓存是将一些常用的数据保存内存或者memcache中,在一定的时间内有人来访问这些数据时,则不再去执行数据库及渲染等操作,而是直接从内存或memcache的缓存中去取得数据,然后返回给用户. 二. Django 中的6种缓存方式 1. 开发调试缓存 2. 内存缓
2018-12-14T09:29:00Z
2018-12-14T09:29:00Z
MAU
https://www.cnblogs.com/polly-ling/
【摘要】Django缓存机制 一. 缓存介绍 缓存是将一些常用的数据保存内存或者memcache中,在一定的时间内有人来访问这些数据时,则不再去执行数据库及渲染等操作,而是直接从内存或memcache的缓存中去取得数据,然后返回给用户. 二. Django 中的6种缓存方式 1. 开发调试缓存 2. 内存缓 <a href="https://www.cnblogs.com/polly-ling/p/10120628.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/polly-ling/p/10118510.html
Python3 模块 -- Fabric自动化模版 - MAU
1. 安装 pip3 install fabric3 2. 创建软连接 find / type f name "fab" /usr/local/python3/bin/fab ln s /usr/local/python3/bin/fab /usr/bin/fab 如果文件名为fabfile.py
2018-12-14T03:34:00Z
2018-12-14T03:34:00Z
MAU
https://www.cnblogs.com/polly-ling/
【摘要】1. 安装 pip3 install fabric3 2. 创建软连接 find / type f name "fab" /usr/local/python3/bin/fab ln s /usr/local/python3/bin/fab /usr/bin/fab 如果文件名为fabfile.py <a href="https://www.cnblogs.com/polly-ling/p/10118510.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/polly-ling/p/10117748.html
error: command 'gcc' failed with exit status 1 - MAU
yum install libxslt devel libffi devel python devel openssl devel 参考: "Linux 安装python3"
2018-12-14T01:40:00Z
2018-12-14T01:40:00Z
MAU
https://www.cnblogs.com/polly-ling/
【摘要】yum install libxslt devel libffi devel python devel openssl devel 参考: "Linux 安装python3" <a href="https://www.cnblogs.com/polly-ling/p/10117748.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/polly-ling/p/10112148.html
django在关闭debug后,admin界面 及静态文件无法加载的解决办法 - MAU
当debug为true的时候,ALLOWED_HOSTS是跳过不管用的。所以这里需要将debug关掉,令debug=false,ALLOWED_HOSTS=[ ' ' ]表示所有的主机都可以访问 参考链接: "Django项目关闭debug模式后,静态文件无法加载的解决办法"
2018-12-13T01:23:00Z
2018-12-13T01:23:00Z
MAU
https://www.cnblogs.com/polly-ling/
【摘要】当debug为true的时候,ALLOWED_HOSTS是跳过不管用的。所以这里需要将debug关掉,令debug=false,ALLOWED_HOSTS=[ ' ' ]表示所有的主机都可以访问 参考链接: "Django项目关闭debug模式后,静态文件无法加载的解决办法" <a href="https://www.cnblogs.com/polly-ling/p/10112148.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/polly-ling/p/10101661.html
django 模板层排序 class Meta 添加信息 - MAU
链接: 1 "Django ORM常用的字段和参数 多对多创建形式 元信息" 2 "参考链接"
2018-12-11T05:36:00Z
2018-12-11T05:36:00Z
MAU
https://www.cnblogs.com/polly-ling/
【摘要】链接: 1 "Django ORM常用的字段和参数 多对多创建形式 元信息" 2 "参考链接" <a href="https://www.cnblogs.com/polly-ling/p/10101661.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/polly-ling/p/10082539.html
mysql 导入 CSV文件命令行 ERROR 13 (HY000): Can't get stat of - MAU
一定要查看好CSV字段结构是否和文件的表结构字段一致 "参考链接1" "参考链接2"
2018-12-07T05:57:00Z
2018-12-07T05:57:00Z
MAU
https://www.cnblogs.com/polly-ling/
【摘要】一定要查看好CSV字段结构是否和文件的表结构字段一致 "参考链接1" "参考链接2" <a href="https://www.cnblogs.com/polly-ling/p/10082539.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/polly-ling/p/10044802.html
Vue 项目 Vue + restfulframework - MAU
Vue 项目 Vue + restfulframework 实现登录认证 django views setting urls Vue 安装包 cnpm install save axios vuex npm install vue cookie save route.js store.js main
2018-11-30T08:09:00Z
2018-11-30T08:09:00Z
MAU
https://www.cnblogs.com/polly-ling/
【摘要】Vue 项目 Vue + restfulframework 实现登录认证 django views setting urls Vue 安装包 cnpm install save axios vuex npm install vue cookie save route.js store.js main <a href="https://www.cnblogs.com/polly-ling/p/10044802.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/polly-ling/p/10042400.html
跨域请求 - MAU
跨域请求 一. 同源策略 同源策略(Same origin policy)是一种约定,它是浏览器最核心也最基本的安全功能,如果缺少了同源策略,则浏览器的正常功能可能都会受到影响。可以说Web是构建在同源策略基础之上的,浏览器只是针对同源策略的一种实现 请求的url地址,必须与浏览器上的url地址处于
2018-11-30T01:40:00Z
2018-11-30T01:40:00Z
MAU
https://www.cnblogs.com/polly-ling/
【摘要】跨域请求 一. 同源策略 同源策略(Same origin policy)是一种约定,它是浏览器最核心也最基本的安全功能,如果缺少了同源策略,则浏览器的正常功能可能都会受到影响。可以说Web是构建在同源策略基础之上的,浏览器只是针对同源策略的一种实现 请求的url地址,必须与浏览器上的url地址处于 <a href="https://www.cnblogs.com/polly-ling/p/10042400.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/polly-ling/p/10033009.html
使用 pandas 导出数据 - MAU
``` python
import pandas as pd # In[58]: df = pd.DataFrame(houselist) # In[59]: df # In[61]: df.to_csv('lianjia') ```
2018-11-28T08:42:00Z
2018-11-28T08:42:00Z
MAU
https://www.cnblogs.com/polly-ling/
【摘要】``` python
import pandas as pd # In[58]: df = pd.DataFrame(houselist) # In[59]: df # In[61]: df.to_csv('lianjia') ``` <a href="https://www.cnblogs.com/polly-ling/p/10033009.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/polly-ling/p/10007179.html
Vue -- 基础语法和使用 - MAU
"Vue" 渐进式 JavaScript 框架 一、走进Vue 1、what 什么是Vue 2、why 为什么要学习Vue 3、special 特点 4、how 如何使用Vue 开发版本: "vue.js" 生产版本: "vue.min.js" 二、Vue实例 1、el:实例 2、data:数据 3
2018-11-23T06:01:00Z
2018-11-23T06:01:00Z
MAU
https://www.cnblogs.com/polly-ling/
【摘要】"Vue" 渐进式 JavaScript 框架 一、走进Vue 1、what 什么是Vue 2、why 为什么要学习Vue 3、special 特点 4、how 如何使用Vue 开发版本: "vue.js" 生产版本: "vue.min.js" 二、Vue实例 1、el:实例 2、data:数据 3 <a href="https://www.cnblogs.com/polly-ling/p/10007179.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/polly-ling/p/9367437.html
Django-用户模块与权限系统相关 - MAU
Django的用户模块与权限系统 Django的用户系统都提供哪些功能: 提供用户模块(User Model) 权限验证(默认添加已有模块的增加删除修改权限) 用户组与组权限功能 用户鉴权与登录功能 与用户登录验证相关的一些函数与装饰方法 1、登录 2.注销 3.验证是否登录 4.验证是否有权限
2018-11-23T05:57:00Z
2018-11-23T05:57:00Z
MAU
https://www.cnblogs.com/polly-ling/
【摘要】Django的用户模块与权限系统 Django的用户系统都提供哪些功能: 提供用户模块(User Model) 权限验证(默认添加已有模块的增加删除修改权限) 用户组与组权限功能 用户鉴权与登录功能 与用户登录验证相关的一些函数与装饰方法 1、登录 2.注销 3.验证是否登录 4.验证是否有权限 <a href="https://www.cnblogs.com/polly-ling/p/9367437.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/polly-ling/p/10007065.html
rest-framework之权限组件 - MAU
权限 权限 作用 : 校验用户是否有权限访问 检测权限肯定是在用户认证通过之后,所有可以直接在request中取出用户做判断 先定义一个类,继承 BasePermission. 局部使用:只需要在视图类中加入 全局使用 setting中设置 导入自己创建的类的函数的位置 权限类使用顺序 权限类使用顺
2018-11-23T05:45:00Z
2018-11-23T05:45:00Z
MAU
https://www.cnblogs.com/polly-ling/
【摘要】权限 权限 作用 : 校验用户是否有权限访问 检测权限肯定是在用户认证通过之后,所有可以直接在request中取出用户做判断 先定义一个类,继承 BasePermission. 局部使用:只需要在视图类中加入 全局使用 setting中设置 导入自己创建的类的函数的位置 权限类使用顺序 权限类使用顺 <a href="https://www.cnblogs.com/polly-ling/p/10007065.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/polly-ling/p/10005877.html
rest-framework之认证组件 - MAU
认证组件 认证简介 作用:校验是否登录 首先定义一个类,集成BaseAuthentication,写一个方法:authenticate,在方法内部,实证过程,认证通过,返回None或者两个对象(user,auth),这两个对象,在视图类的request中可以取出来.如果返回的是None,就走下一个认
2018-11-23T02:16:00Z
2018-11-23T02:16:00Z
MAU
https://www.cnblogs.com/polly-ling/
【摘要】认证组件 认证简介 作用:校验是否登录 首先定义一个类,集成BaseAuthentication,写一个方法:authenticate,在方法内部,实证过程,认证通过,返回None或者两个对象(user,auth),这两个对象,在视图类的request中可以取出来.如果返回的是None,就走下一个认 <a href="https://www.cnblogs.com/polly-ling/p/10005877.html" target="_blank">阅读全文</a>