文章分类 -  问题汇总

python
TypeError: __init__() missing 1 required positional argument: 'on_delete'
摘要:Django在根据models生成数据库表时报 __init__() missing 1 required positional argument: 'on_delete' 1 from django.db import models 2 3 # Create your models here. 4 阅读全文

posted @ 2020-01-16 00:12 cherry_ning 阅读(191) 评论(0) 推荐(0)

(translation.E004) You have provided a value for the LANGUAGE_CODE setting that is not in the LANGUAGES setting
摘要:django3.0开始LANGUAGE_CODE前面必须配相应的LANGUAGES配置如下: from django.utils.translation import gettext_lazy as _ LANGUAGES = [ ('zh-Hans', _('Chinese')), ] LANGU 阅读全文

posted @ 2020-01-16 00:06 cherry_ning 阅读(578) 评论(0) 推荐(0)

overflow:auto 不生效的原因
摘要:如果要设置overflow-y:auto下拉滚动条,overflow-y必须加在父容器上,且必须指定子元素div的高度才能生效。 如下设置:<div class="center_wrap"> <div style="height:1500px;width:200px;background-color 阅读全文

posted @ 2019-12-02 22:09 cherry_ning 阅读(6111) 评论(0) 推荐(0)

SyntaxError: Non-UTF-8 code starting with '\xbd' in file
摘要:SyntaxError: Non-UTF-8 code starting with '\xbd' in file E:/python_project/request_test/practice/singleNode.py on line 3, but no encoding declared; se 阅读全文

posted @ 2019-09-17 14:25 cherry_ning 阅读(1243) 评论(0) 推荐(0)

socket模块-OSError: [WinError 10022] 提供了一个无效的参数。
摘要: 阅读全文

posted @ 2019-08-24 15:51 cherry_ning 阅读(4590) 评论(0) 推荐(0)

python执行时遇到的坑
摘要:1、定义函数时,函数名尽量不要以test开头,即def test..()。(除非用到单元测试框架的时候,要以test开头。)不然的话,pycharm运行的时候,会以Unittest in xx.py去运行该模块 阅读全文

posted @ 2019-08-19 22:32 cherry_ning 阅读(70) 评论(0) 推荐(0)

导航