在上线调试Django 项目的时候,发现通过admin向某个数据库中表添加数据的时候,显示Server Error (500)。。。但是向其他表添加数据时一切正常。
用到Ueditor,有时会遇到这个问题。
解决步骤:
1. 将部署到阿里云上的项目Debug 改成True
2. 重启该项目,继续向该表中插入数据,查看报错: render() got an unexpected keyword argument 'renderer'
3. 这种错误是由于使用了Ueditor导致的,
4. 把/usr/local/lib/python3.8/dist-packages/django/forms/boundfield.py 文件中第93行注释掉
做完上述步骤之后,重启该项目。大功告成!!!