自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 RuntimeError: Model class common.models.models.** doesn‘t declare an explicit app_label and isn‘t in

明明已经注册了settings,但是为什么还是会报这个错。检查一下当前包下是否有一个重名的settings文件,如有,改下名字即可解决。

2023-09-19 12:14:48 631

原创 django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not

单独使用djangoORM的坑点

2023-08-30 14:27:31 1105 1

原创 关于Python中子类调用父类方法时如何实现不覆盖父类的init方法

如果想在子类中调用父类方法,并且不覆盖父类的init方法,只需要在子类的init方法中添加一行代码:A.__init__(self),详情见下面代码class A(object): def __init__(self): class_name=self.__class__.__name__ print ("class_name:", class_name) def getName(self,name): return namecla.

2022-03-30 19:48:48 1045

原创 springboot+httpClient接口自动化框架搭建

因最近在学习springboot,想着这么NB的框架如果用来写接口自动化会怎样呢?于是自己就搭建了一个接口自动化的框架。在看该项目时,需要一点点的springboot基础。话不多说,直接上源码,将代码复制过去改下接口就能运行。有写的不好的地方,还请各位大佬指点指点。1.先看下整个项目结构:2.项目的 pom.xml文件<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.o

2021-03-24 14:58:49 941 1

原创 TypeError: module() takes at most 2 arguments (3 given)

Traceback (most recent call last): File "D:/pywork/kgtext/src/utils/test_suite2.py", line 3, in <module> class testHttp(unittest):TypeError: module() takes at most 2 arguments (3 given)unittest报错解决方法:是因为继承错了。testHttp应该继承unittest.TestCase...

2021-02-20 10:53:40 5350

原创 python项目路径在linux环境中的路径区别

python项目路径在本地运行时,不用写根目录但是在linux环境运行时,需要加上../,要不然会找不到路径

2021-02-19 17:54:37 413

转载 CentOS7下将Python的版本升级为3.7

1.检查确认系统的相关信息[root@localhost /]# cat /etc/redhat-releaseCentOS Linux release 7.6.1810 (Core)[root@localhost /]# uname -aLinux localhost.localdomain 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux[root@localhost

2021-02-19 13:53:58 786

原创 TypeError: ‘Pagination‘ object is not iterable

分页插件报错,TypeError: 'Pagination' object is not iterable解决方法:在paginate(page,per_page=10)后加上.items

2021-01-21 11:24:23 1622 2

原创 TypeError: The view function did not return a valid response. The function either returned None or e

网上查了很多资料,都没解决这个问题,方法已经有return了,但是还是报错TypeError: The view function did not return a valid response. The function either returned None or ended without a return statement.后来才发现,我另外一个蓝图里面有个同名的路径,该同名路径无返回值。所以,在出现这种情况下,也要检查一下是否其他蓝图里有同名的路径...

2021-01-21 09:59:08 5145

原创 阿里云官网更新后的镜像加速地址如何查看

麻辣个担子,阿里云官网页面改了,找了半天没找到阿里云镜像加速地址在哪里!先在产品,搜素镜像,点容器镜像服务 ACR点管理控制台

2020-12-14 18:37:58 600

转载 idea中的maven模块变成灰色的可能原因

在使用idea的过程中,遇到其中一个maven模块变成灰色,如下所示:造成这个的原因可能是忽略了maven模块,可以尝试如下解决方法:在idea中maven的setting中找到ignored files,看右边的面板中是否将变灰的maven模块忽略了。我的模块变灰就是因为这个原因,如下图所示:...

2020-12-09 17:12:26 853

原创 springboot自定义监听器SpringApplicationRunListener的坑

Exception in thread "main" java.lang.IllegalArgumentException: Cannot instantiate interface org.springframework.boot.SpringApplicationRunListener : com.itheima.springbootlistener.listener.MySpringApplicationRunListener at org.springframework.boot.Sprin...

2020-12-07 10:29:23 1948 2

转载 zkCli.sh -server 报错 Error: Could not find or load main class org.apache.zookeeper.ZooKeeperMain

出现Error: Could not find or load main class org.apache.zookeeper.server.quorum.QuorumPeerMain错误,解决方法:下载apache-zookeeper-3.5.6-bin.tar.gz,而不是apache-zookeeper-3.5.6.tar.gz。转自https://www.linjiangxiong.com/2019/12/12/zookeeper-problem-1/...

2020-11-17 11:22:25 662

空空如也

空空如也

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

TA关注的人

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