本人是python新手,按照自强学堂-Django教程,在内容编辑框中加入 DjangoUeditor 编辑器;把学习过程中遇到的问题总结如下,如有不对的地方请指正。

python 3.6

Django2.1

下载后,放在项目文件下,与自定义的APP的目录同一层级

https://github.com/twz915/DjangoUeditor3  

1、在urls注册DjangoUeditor,提示TypeError: view must be a callable or a list/tuple in the case of include(),应该是django版本问题,用path(‘’,include('.uls')) 解决。后面发现,在urls最上方,注释部分就有详细的语法说明,如截图

DjangoUeditor 编辑器

2、runserver 后,一直提示参数错误ender() got an unexpected keyword argument 'renderer',网上给出的解决方法,找到具体的报错.py文件,注释后解决;也看了其他网友,把该函数的最后两个参数合并成一个(还没有尝试)

r

DjangoUeditor 编辑器

3、运行后不报错了,但是内容编辑框点不动,也不显示编辑器界面按钮;尝试执行命令python manage.py collectstatic,把静态文件复制到static下还是不行;后面把地址改成第二个后正常,有没有哪位大神知道什么原因呢,感谢!!!

http://127.0.0.1:8000/admin/...

http://localhost:8000/admin/...

settings配置如下

DjangoUeditor 编辑器

urls配置如下

DjangoUeditor 编辑器

 

DjangoUeditor 编辑器

 

相关文章:

  • 2021-06-23
  • 2021-08-22
  • 2021-11-17
  • 2021-11-23
  • 2021-07-16
  • 2021-12-19
  • 2021-04-06
猜你喜欢
  • 2021-10-31
  • 2021-04-25
  • 2021-10-04
  • 2021-05-08
  • 2021-06-22
  • 2022-12-23
相关资源
相似解决方案