自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(3)
  • 收藏
  • 关注

原创 解决 TypeError: BlockedIPSMiddleware() takes no arguments

解决 TypeError: BlockedIPSMiddleware() takes no arguments在定义中间件类的时候出现了这个错误环境介绍:python3.8+Django2.2创建这个中间件类是为了阻止某些IP地址访问你的服务器就把某人拉入黑名单一样你的应用下创建 middleware.py 文件from django.http import HttpResponseclass BlockedIPSMiddleware(object): """中间件类"""

2020-12-30 04:55:15 676 2

原创 解决 Set the app_name attribute in the included module..... url反向解析

解决 Set the app_name attribute in the included module, or pass a 2-tuple containing the list of patterns and app_name instead.在学习url反向解析时,遇到的这个问题环境:python3.8+Django2.2项目名:test4应用名:booktest项目的urls.pyfrom django.contrib import adminfrom django.urls imp

2020-12-28 17:30:20 586

原创 解决 query = query.decode(errors=‘replace‘) AttributeError: ‘str‘ object has no attribute ‘decode‘

解决 query = query.decode(errors=‘replace’) AttributeError: ‘str’ object has no attribute ‘decode’Django项目,配置mysql数据的时候,安装mysql之后,配置完成后,运行django项目,出现错误提示信息如何解决这个BUGquery = query.decode(errors='replace')AttributeError: 'str' object has no attribute 'decod

2020-12-23 02:15:08 2867 7

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除