随笔 - 475,  文章 - 0,  评论 - 66,  阅读 - 396万
12 2020 档案
maven项目添加Gson的依赖后无法启动,报错BeanCreationException:Error creating bean with name 'gsonBuilder'
摘要:启动项目时,新添加的Gson依赖jar包出现错误,通过异常信息查询资料,猜测可能是Gson的版本问题,导致无法创建gsonBuilder,自己原来的版本是2.2.4,于是换成了https://blog.csdn.net/email_jade/article/details/72886991?utm_ 阅读全文
posted @ 2020-12-24 17:42 锋齐叶落 阅读(913) 评论(0) 推荐(0) 编辑
'bool' object is not callable
摘要:使用 Django自带的 auth 用户验证功能,编写函数,使用 is_authenticated 检查用户是否登录,结果报错: TypeError at / 'bool' object is not callable 编写函数如下: 查询相关资料,发现 is_authenticated 是属性而不 阅读全文
posted @ 2020-12-11 13:34 锋齐叶落 阅读(5172) 评论(1) 推荐(1) 编辑
UnicodeDecodeError: 'gbk' codec can't decode byte 0xa6 in position 9737: illegal multibyte sequence
摘要:Django2.2 安装后,使用runserver进行开发,出错时错误信息只显示于控制台命令行,而在前端页面只显示一行 “A server error occurred. Please contact the administrator.” 排错很不方便,仔细查看控制台的错误信息,提示 Unicod 阅读全文
posted @ 2020-12-11 13:23 锋齐叶落 阅读(927) 评论(0) 推荐(1) 编辑
django.contrib.auth.middleware.AuthenticationMiddleware' must be in MIDDLEWARE in order to use the admin application.
摘要:错误日志 ERRORS: ?: (admin.E408) 'django.contrib.auth.middleware.AuthenticationMiddleware' must be in MIDDLEWARE in order to use the admin application. ?: 阅读全文
posted @ 2020-12-11 11:32 锋齐叶落 阅读(1094) 评论(0) 推荐(0) 编辑
ForeignKey(unique=True) is usually better served by a OneToOneField.
摘要:primary_key表示unique = True.所以,正如警告所说,你可能应该使用OneToOneField 阅读全文
posted @ 2020-12-11 11:29 锋齐叶落 阅读(442) 评论(0) 推荐(0) 编辑
NameError: name 'reload' is not defined
摘要:对于 Python 2.X:import sysreload(sys)sys.setdefaultencoding("utf-8") 对于 <= Python 3.3:import impimp.reload(sys) 注意: 1. Python 3 与 Python 2 有很大的区别,其中Pyth 阅读全文
posted @ 2020-12-11 11:23 锋齐叶落 阅读(370) 评论(0) 推荐(0) 编辑
No module named 'django.core.urlresolvers'
摘要:换成django.urls 阅读全文
posted @ 2020-12-11 10:38 锋齐叶落 阅读(95) 评论(0) 推荐(0) 编辑
No module named 'ckeditor'
摘要:使用pip install django-ckeditor安装 阅读全文
posted @ 2020-12-11 10:31 锋齐叶落 阅读(805) 评论(0) 推荐(0) 编辑
项目运行报错query = query.encode('utf-8').decode(errors='replace')
摘要:打开D:\ProgramData\Anaconda3\Lib\site-packages\django\db\backends\mysql\operations.py文件 def last_executed_query(self, cursor, sql, params): # With MySQL 阅读全文
posted @ 2020-12-07 15:33 锋齐叶落 阅读(682) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示