django时区问题问题?请各位能帮帮忙!

django项目部署出现问题,请大家帮忙看看。
[问题点数:200分,无满意结帖,结帖人weixin_]
本版专家分:0
结帖率 100%
CSDN今日推荐
本版专家分:11037
2017年10月 其他开发语言大版内专家分月排行榜第一2017年9月 其他开发语言大版内专家分月排行榜第一2017年8月 其他开发语言大版内专家分月排行榜第一2017年7月 其他开发语言大版内专家分月排行榜第一2017年3月 其他开发语言大版内专家分月排行榜第一
2018年3月 其他开发语言大版内专家分月排行榜第二2018年1月 其他开发语言大版内专家分月排行榜第二2017年11月 其他开发语言大版内专家分月排行榜第二2016年12月 其他开发语言大版内专家分月排行榜第二
2017年12月 其他开发语言大版内专家分月排行榜第三
本版专家分:0
结帖率 100%
匿名用户不能发表回复!|
CSDN今日推荐python “TypeError: object() takes no parameters”问题,求大神帮忙看看_百度知道
python “TypeError: object() takes no parameters”问题,求大神帮忙看看
calculator.py
class Count:
def __int__(self,a,b):
self.a = int(a)
self.b = int(b)
def add(self):
return self.a + self.b
from calculator import Count
#测试两个整数相加
class T...
我有更好的答案
Count这个类的构造方法写错了,写成了def&__int__(self,a,b):应该是:def&__init__(self,a,b):
采纳率:69%
来自团队:
为您推荐:
其他类似问题
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。启动django自带web服务时提示编码错误,有没有大佬帮忙解决一下【python吧】_百度贴吧
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&签到排名:今日本吧第个签到,本吧因你更精彩,明天继续来努力!
本吧签到人数:0成为超级会员,使用一键签到本月漏签0次!成为超级会员,赠送8张补签卡连续签到:天&&累计签到:天超级会员单次开通12个月以上,赠送连续签到卡3张
关注:186,606贴子:
启动django自带web服务时提示编码错误,有没有大佬帮忙收藏
启动django自带web服务时提示编码错误,有没有大佬帮忙解决一下
代码都没有,哪位大佬能给你透过屏幕去给你找bugs
当时提示这个:UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcd in position 0: invalid continuation byte
是电脑用户名是中文的问题,已经解决了
登录百度帐号第三方登录:有没有做 python django 开发的?我在后台装了个 ckeditor 结果 sever error 500 了,求大神帮忙! - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
已注册用户请 &
有没有做 python django 开发的?我在后台装了个 ckeditor 结果 sever error 500 了,求大神帮忙!
17:43:43 +08:00 · 1809 次点击
用 django 写了一个网站,然后后台的编辑器太简陋了,于是就装了富文本编辑器 ckeditor 并且设置了上传图片到服务器.在本地测试没有问题,部署到服务器 ubuntu ,上传图片就不行了,本应该显示图片的框框里结果显示 server error 500 错误。
由于我在 stackoverflow 上提问了,所以就不重写一次了。
会的朋友帮看看,感谢!
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.
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
and added a view function in . 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.
8 回复 &| &直到
22:19:38 +08:00
& & 17:55:25 +08:00 via Android
检查写入权限
& & 18:02:36 +08:00
配下 log, 看看错误堆栈吧. 光给个 500 很难定位
& & 18:13:20 +08:00
可能是权限问题吧,你把 settings.py 里面的`debug=True`打开,会看到更多有用信息。。
& & 18:23:22 +08:00
@ @ @ 在服务器能找到文件,说明可以上传,只是返回 url 的时候出错, debug=True 开了,依然也只显示 500.怎么配置 log 呢?
& & 20:59:42 +08:00
正好我前段时间专门做了一期 django 跟编辑器的整合的视频教程
地址在这里
& & 21:02:48 +08:00
1.ckeditor 是一个前端插件
2.文件上传部分我用的时候是自己写的, Js 对接上去的。
& & 22:16:10 +08:00
如果出错的话,即便异常被捕获了,之后的那个 res 里引用的 file_name 是没定义的
& & 22:19:38 +08:00
权限问题.
ls -l 看一下图片上传的目的目录的所有者和权限
再 ps -aef 对比你 django wsgi server 的用户组
& · & 1004 人在线 & 最高记录 3541 & · &
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.1 · 16ms · UTC 23:32 · PVG 07:32 · LAX 16:32 · JFK 19:32? Do have faith in what you're doing.

我要回帖

更多关于 django 跨域问题 的文章

 

随机推荐