![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
笔记
Summer@123
不积跬步,无以至千里
展开
-
cannot import name ‘force_text‘ from ‘django.utils.encoding‘
找到引用force_text的语句,将改成from django.utils.encoding import force_str as force_text。新版本上django.utils.encoding中的已经不叫这个了,叫force_str。原创 2024-07-14 17:43:57 · 96 阅读 · 0 评论 -
CSRF verification failed. Request aborted.
最近在学习django,遇到这个问题。CSRF verification failed. Request aborted.1、在Html template中加入csrf_token。2、在view.py中对应的view函数上加上装饰器。再启动运行,报错就解决了。原创 2024-07-01 16:10:27 · 270 阅读 · 0 评论 -
给已有python项目配置虚拟环境
给已有python项目配置虚拟环境。原创 2024-06-15 19:45:47 · 165 阅读 · 0 评论 -
redis.exceptions.ResponseError: WRONGTYPE Operation against a key holding the wrong kind of value
redis有几种数据类型,每一种数据类型查询的方式不同,如果查询方法和数据类型不一致就会报redis.exceptions.ResponseError: WRONGTYPE Operation against a key holding the wrong kind of value。例如,一个Zset类型的数据,如果使用get()方法查询就会遇到这种问题。可以先查看一下数据类型,再使用对应的方法查询,就能解决这个问题。Zset类型的数据,正确的应该是使用zrange()方法。原创 2024-01-09 17:45:29 · 686 阅读 · 0 评论 -
redis.exceptions.ConnectionError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1006)
redis常见报错原创 2024-01-09 15:53:28 · 819 阅读 · 0 评论 -
adb: failed to install .\xxxxxx.apk: Failure [INSTALL_FAILED_USER_RESTRICTED
开发者模式和USB调试均已打开,adb安装时报错。看了一下,小米手机还需要开启USB安装才行。原创 2023-07-06 15:52:31 · 1215 阅读 · 0 评论 -
WSL2 installation is incomplete解决方案
4、执行wsl --shutdown命令,但是docker还是显示stopped,并且打开docker settings一直loading。之后重启PC后正常了。Settings也可以正常打开。[在这里插入图片描述](https://img-blog.csdnimg.cn/266996fefe4b41ae87f8b6c13a49b50f.png。2、按照官方文档说明,在poweshell中执行这个命令,但是却显示的是帮助文档。3、在help文档上找到了update命令。执行wsl --update命令。原创 2022-10-30 18:52:16 · 4683 阅读 · 0 评论 -
python -m pip install --upgrade pip报错
使用python -m pip install --upgrade pip一直报错WARNING: You are using pip version 22.0.4; however, version 22.1.2 is available.You should consider upgrading via the ‘D:\Developer\Python310-32\python.exe -m pip install --upgrade pip’ command.使用国内镜像可解决。python -m原创 2022-07-10 11:31:24 · 2153 阅读 · 1 评论 -
Cannot open D:\Python\Scripts\pip-script.py
在命令行中执行这个命令可以解决问题:easy_install pip原创 2021-07-12 18:58:38 · 878 阅读 · 0 评论 -
在Maven添加TestNG依赖不能够创建TestNG Class
在Maven中添加TestNG依赖后,依旧没有看到创建testng class的选项,对比之前配置好的机器和新机器的不同,因此试着在线安装TestNG(不知道本质原因是什么,欢迎评论)使用此网址https://testng.org/testng-eclipse-update-site在eclipse上选择Help-> Install New Software,详细教程自行百度官方网址:https://testng.org/doc/download.html安装TestNG成功后,重启Eclips原创 2021-07-11 10:24:05 · 265 阅读 · 0 评论 -
maven pom.xml配置
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersio原创 2021-06-26 11:38:48 · 243 阅读 · 0 评论 -
为不同Outlook Mail账号创建profile
打开Control Panel -> Mail(Microsoft Outlook)输入profile name.输入账号和密码等待创建成功打开Outlook,将会弹出一个对话框,从下拉菜单中选择创建的Profile,然后点击OK.原创 2021-05-11 12:57:17 · 855 阅读 · 0 评论 -
Windows加域以及添加工作账号
右键This PC,选择Properties,或者打开Control panel -> System and Security -> System.在System中点击Change settings输入域名加域需要验证时输入自己的工作账号加域成功后会提示需要重启机器,可以选择稍后重启。如果是虚拟机加域,那么在虚拟机加域之后,在虚拟机上添加自己的工作账号。6. 在本机添加自己的工作账号:打开Control panel -> User Accounts..原创 2021-05-11 12:41:07 · 2041 阅读 · 0 评论 -
Windows启用Hyper-V以及创建虚拟机
Enable Hyper-V using Powershell1)open a PowerShell console as administrator2)Run the following command:Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All 注:Enable之后可能要重启机器。 重启机器后打开Hyper-V manager,连接到本机Server修改Hyper-V设置..原创 2021-05-11 12:26:09 · 611 阅读 · 0 评论