python: 3.7
Django: 2.1
IDE: Pycharm
根据 https://blog.csdn.net/duke10/article/details/81033686 这边的教程配置后报错

方法:
根据提示找到这个文件boundfield.py
def as_widget方法 93行
return widget.render(
name=self.html_initial_name if only_initial else self.html_name,
value=self.value(),
attrs=attrs,
renderer=self.form.renderer,
)
# 改为
return widget.render(
name=self.html_initial_name if only_initial else self.html_name,
value=self.value(),
attrs=attrs,
# renderer=self.form.renderer,
)
return force_text(html)
博客记录了使用Python 3.7、Django 2.1和Pycharm IDE时,按照教程配置报错的情况。并给出处理方法,即根据提示找到boundfield.py文件,定位到def as_widget方法的93行。


被折叠的 条评论
为什么被折叠?



