在富文本上传图片的时候,好像权限不够。。
来源:13-7 xadmin集成富文本ueditor2
l__eon
2017-01-24
第一个错误
[24/Jan/2017 14:07:11] "GET /static/ueditor/third-party/zeroclipboard/ZeroClipboard.swf?noCache=1485238031803 HTTP/1.1" 200 3933
Forbidden (CSRF token missing or incorrect.): /ueditor/controller/
[24/Jan/2017 14:07:15] "POST /ueditor/controller/?imagePathFormat=courses%2F%25%28basename%29s_%25%28datetime%29s.%25&filePathFormat=courses%2F%25%28basename%29s_%25%28datetime%29s.%25&action=uploadimage HTTP/1.1" 403 2266
第二个错误,提示这种方式是过时的
C:\Users\hkl\Envs\mxnoline\lib\site-packages\DjangoUeditor\urls.py:11: RemovedInDjango110Warning: django.conf.urls.patterns() is deprecated and will be removed in Django 1.10. Update your urlpatterns to be a list of django.conf.urls.url() instances instead.
url(r'^controller/$',get_ueditor_controller)
3回答
-
github上源码安装的有点问题, 有三个解决办法, 第一个是用我群里上传的虚拟环境, 第二个是安装烈焰说的也可以, 第三种是把后台的view方法加上crsf_exmpt装饰器就行了
052018-09-03 -
bobby
2017-01-24
你是通过github上最新的源码安装的是吧?
012017-01-24 -
烈焰卡卡
2017-01-29
确实,从github上下来之后,通过命令行python setup安装,上传图片时候是会报CSRF错误,需要把github上的源码复制粘贴到site-packages目录下覆盖安装好的
212017-06-12
相似问题