- 博客(6)
- 资源 (1)
- 收藏
- 关注
原创 AttributeError: 'callable_iterator' object has no attribute 'next',python3中迭代器的next()方法已变成__next__()
报错信息:Traceback (most recent call last): File "F:/unit1/01_03.py", line 149, in <module> g = it.next()AttributeError: 'callable_iterator' object has no attribute 'next'解决办法:将上述代码中调用next()的地方全...
2018-04-30 15:10:29 7185 2
原创 Specifying a namespace in include() without providing an app_name is not supported.
报错信息:Specifying a namespace in include() without providing an app_name is not supported. Set the app_name attribute in the included module, or pass a 2-tuple containing the list of patterns and app_na...
2018-04-27 14:18:33 349
原创 编码错误UnicodeDecodeError at / 'utf-8' codec can't decode byte 0xb1 in position 30: invalid start byte
类似这种UnicodeDecodeError at / 'utf-8' codec can't decode byte 0xb1 in position 30: invalid start byte编码错误,分析解决方案如下:1、查看控制台报错,找出引发错误的文件,任何程序员自己编写的文件都可能存在编码不一致(统一utf-8为例)的问题2、去notepad+中,把引发错误的文件转换编码,格式-&g...
2018-04-26 00:11:59 2222
原创 eclipse+pydev 导入已有的Django项目
方法:1、打开eclipse,创建与需要导入的项目相同的项目名称,例如:项目名称为learning_log2.本地已有Django工程目录截图:3、打开eclipse创建的django工程本地目录:4、把步骤2标记的文件复制替换对应步骤3中的文件,重启eclipse即可...
2018-04-25 22:45:00 843
原创 Django学习官网指导文档:使用models.ForeignKey时python3.7一定要传入实参on_delete=models.CASCADE
网址:https://docs.djangoproject.com/en/2.0/Fields模型中最重要的部分——以及模型中唯一需要的部分——是它定义的数据库字段列表。字段由类属性指定。注意不要选择与模型API冲突的字段名称,如清除、保存或删除。from django.db import modelsclass Musician(models.Model): first_name =...
2018-04-25 20:35:57 3094
转载 Powershell直接脚本时出现无法加载文件因为在此系统中禁止执行脚本问题的解决方法
在Powershell直接脚本时会出现:无法加载文件 ******.ps1,因为在此系统中禁止执行脚本。有关详细信息,请参阅 "get-help about_signing"。 所在位置 行:1 字符: 17 + E:\Test\test.ps1 <<<< + CategoryInfo : NotSpecified: (:) [], PSSecurityException ...
2018-04-24 22:33:38 2230
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人