用 django 写了一个网站,然后后台的编辑器太简陋了,于是就装了富文本编辑器 ckeditor 并且设置了上传图片到服务器.在本地测试没有问题,部署到服务器 ubuntu ,上传图片就不行了,本应该显示图片的框框里结果显示 server error 500 错误。 由于我在 stackoverflow 上提问了,所以就不重写一次了。 会的朋友帮看看,感谢! http://stackoverflow.com/questions/41219168/uploading-images-use-django-ckeditor-getting-server-error500
I have been struggling for the problem for two days. Unfortunately, i still have no idea to solve it due to my poor knowledge. So i have to come here asking for help. Very appreciate !
enter image description here
I want to write a website as my blog and use Django to implement it. To develop this website, i have to use rich text editor, so i use CKeditor on admin panel. Here is the link of Ckeditor source code on github. https://github.com/django-ckeditor/django-ckeditor
To upload images using ckeditor widget , i edited this file../static/ckeditor/ckeditor/plugins/image/di alogs/image.js so it can display the images upload button.
id:"Upload",hidden:!0 I also added upload url in config.js. After that, i set routing in the urls.py and added a view function in views.py. Everything was ok on my computer. however, after i deployed it to website server i got server error(500) during uploading a image by ckeditor . Ckeditor widget can not return the urls but i can find the images on server which i uploaded by ckeditor.
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.