将博客文章添加到Django背景时出现服务器错误(500)

时间:2019-03-19 13:36:28

标签: python django nginx uwsgi

当我部署django时,我使用了nginx和uwsgi,现在我可以登录到主页,但是当我从django-admin(ip​​:80 / admin)添加文章时,我无法进入编辑页面,然后看到服务器。错误(500),我不知道为什么,我将打开文章的详细信息,并且将无法修改页面。请帮我找出来,是什么原因,非常感谢。 这是我的models.py:

class HuoDong(models.Model):
    hdname = models.CharField('hdname',max_length = 200,null = False)
    hddescription = models.CharField('hddescription',max_length = 200,null = False, default = '活动描述')
    hdpicture = models.ImageField('picture',upload_to='static/images/',default = 'normal.jpg')
    hdblog = UEditorField(width=1000, height=1500, toolbars="full", imagePath="static/images/%%Y/%%m/", filePath="files/",upload_settings={"imageMaxSize":1204000},settings={},verbose_name='hdblog')
    hdtime = models.DateTimeField('time',auto_now_add = True)

    def __str__(self):
        return self.hdname

然后,我问,在部署django之后,我设置DEBUG = False,这一次我应该去哪里找到错误消息,我读了uwsgi.log和nginx error.log,却没有找到有用的信息

uwsgi.log:

[pid: 2282|app: 0|req: 123/474] 47.104.105.24 () {36 vars in 434 bytes} [Tue Mar 19 21:11:17 2019] GET / => generated 32201 bytes in 8 msecs (HTTP/1.1 200) 5 headers in 293 bytes (1 switches on core 1)
[pid: 2282|app: 0|req: 124/475] 139.162.88.63 () {32 vars in 421 bytes} [Tue Mar 19 21:15:08 2019] GET /echo.php?info=1234567890 => generated 77 bytes in 1 msecs (HTTP/1.1 404) 3 headers in 100 bytes (1 switches on core 0)
[pid: 2280|app: 0|req: 125/476] 180.156.58.29 () {44 vars in 936 bytes} [Tue Mar 19 21:15:21 2019] GET /admin/ssccapp/huodong/1/change/ => generated 27 bytes in 50 msecs (HTTP/1.1 500) 5 headers in 294 bytes (1 switches on core 0)
[pid: 2280|app: 0|req: 126/477] 180.156.58.29 () {42 vars in 824 bytes} [Tue Mar 19 21:15:22 2019] GET /favicon.ico => generated 77 bytes in 1 msecs (HTTP/1.1 404) 3 headers in 100 bytes (1 switches on core 1)
[pid: 2342|app: 0|req: 107/478] 194.50.254.170 () {32 vars in 473 bytes} [Tue Mar 19 21:24:03 2019] GET / => generated 32201 bytes in 9 msecs (HTTP/1.1 200) 5 headers in 293 bytes (1 switches on core 1)
[pid: 2281|app: 0|req: 125/479] 47.101.204.125 () {34 vars in 482 bytes} [Tue Mar 19 21:29:02 2019] GET / => generated 32201 bytes in 9 msecs (HTTP/1.1 200) 5 headers in 293 bytes (1 switches on core 0)
[pid: 2281|app: 0|req: 126/480] 203.208.60.127 () {36 vars in 528 bytes} [Tue Mar 19 21:38:21 2019] GET /robots.txt => generated 77 bytes in 1 msecs (HTTP/1.1 404) 3 headers in 100 bytes (1 switches on core 1)
[pid: 2342|app: 0|req: 108/481] 203.208.60.33 () {40 vars in 848 bytes} [Tue Mar 19 21:38:22 2019] GET / => generated 32201 bytes in 9 msecs (HTTP/1.1 200) 5 headers in 293 bytes (1 switches on core 0)
[pid: 2282|app: 0|req: 125/482] 203.208.60.76 () {40 vars in 864 bytes} [Tue Mar 19 21:38:52 2019] GET /news/11/ => generated 18266 bytes in 8 msecs (HTTP/1.1 200) 3 headers in 111 bytes (1 switches on core 1)
[pid: 2282|app: 0|req: 126/483] 203.208.60.106 () {40 vars in 865 bytes} [Tue Mar 19 21:39:02 2019] GET /contact/ => generated 15621 bytes in 4 msecs (HTTP/1.1 200) 3 headers in 111 bytes (1 switches on core 0)
[pid: 2280|app: 0|req: 127/484] 203.208.60.2 () {42 vars in 786 bytes} [Tue Mar 19 21:39:11 2019] GET /contact/js//static/js/easing.js => generated 77 bytes in 1 msecs (HTTP/1.1 404) 3 headers in 100 bytes (1 switches on core 0)
[pid: 2280|app: 0|req: 128/485] 203.208.60.20 () {40 vars in 864 bytes} [Tue Mar 19 21:39:52 2019] GET /picture/ => generated 14052 bytes in 4 msecs (HTTP/1.1 200) 3 headers in 111 bytes (1 switches on core 1)
[pid: 2342|app: 0|req: 109/486] 203.208.60.106 () {42 vars in 788 bytes} [Tue Mar 19 21:39:56 2019] GET /picture/js//static/js/easing.js => generated 77 bytes in 1 msecs (HTTP/1.1 404) 3 headers in 100 bytes (1 switches on core 1)
[pid: 2281|app: 0|req: 127/487] 203.208.60.61 () {40 vars in 866 bytes} [Tue Mar 19 21:40:51 2019] GET /register/ => generated 13195 bytes in 3 msecs (HTTP/1.1 200) 3 headers in 111 bytes (1 switches on core 0)
[pid: 2281|app: 0|req: 128/488] 203.208.60.47 () {42 vars in 790 bytes} [Tue Mar 19 21:40:54 2019] GET /register/js//static/js/easing.js => generated 77 bytes in 1 msecs (HTTP/1.1 404) 3 headers in 100 bytes (1 switches on core 1)
[pid: 2342|app: 0|req: 110/489] 203.208.60.35 () {38 vars in 585 bytes} [Tue Mar 19 21:55:36 2019] GET / => generated 32201 bytes in 10 msecs (HTTP/1.1 200) 5 headers in 293 bytes (1 switches on core 0)
[pid: 2282|app: 0|req: 127/490] 216.245.197.254 () {26 vars in 305 bytes} [Tue Mar 19 21:57:24 2019] HEAD /robots.txt => generated 77 bytes in 1 msecs (HTTP/1.0 404) 3 headers in 100 bytes (1 switches on core 1)

nginx:error.log:

2019/03/19 19:20:04 [error] 2324#2324: *813 open() "/var/www/sscc2019/static/js/jquery-1.12.4.min.js" failed (2: No such file or directory), client: 180.156.58.29, server: ssccracing.com, request: "GET /static/js/jquery-1.12.4.min.js HTTP/1.1", host: "47.101.157.128", referrer: "http://127.0.0.1/"
2019/03/19 19:20:04 [error] 2324#2324: *812 open() "/var/www/sscc2019/static/js/jquery-1.7.2.min.js" failed (2: No such file or directory), client: 180.156.58.29, server: ssccracing.com, request: "GET /static/js/jquery-1.7.2.min.js HTTP/1.1", host: "47.101.157.128", referrer: "http://127.0.0.1/"
2019/03/19 19:20:04 [error] 2324#2324: *813 open() "/var/www/sscc2019/static/js/jquery.min.js" failed (2: No such file or directory), client: 180.156.58.29, server: ssccracing.com, request: "GET /static/js/jquery.min.js HTTP/1.1", host: "47.101.157.128", referrer: "http://127.0.0.1/"
2019/03/19 19:20:07 [error] 2324#2324: *815 open() "/var/www/sscc2019/static/js/jquery-1.12.4.min.js" failed (2: No such file or directory), client: 180.156.58.29, server: ssccracing.com, request: "GET /static/js/jquery-1.12.4.min.js HTTP/1.1", host: "47.101.157.128", referrer: "http://127.0.0.1/"
2019/03/19 19:20:07 [error] 2324#2324: *815 open() "/var/www/sscc2019/static/js/jquery-1.7.2.min.js" failed (2: No such file or directory), client: 180.156.58.29, server: ssccracing.com, request: "GET /static/js/jquery-1.7.2.min.js HTTP/1.1", host: "47.101.157.128", referrer: "http://127.0.0.1/"
2019/03/19 19:20:15 [error] 2324#2324: *815 open() "/var/www/sscc2019/static/js/jquery.min.js" failed (2: No such file or directory), client: 180.156.58.29, server: ssccracing.com, request: "GET /static/js/jquery.min.js HTTP/1.1", host: "47.101.157.128", referrer: "http://127.0.0.1/"

我检查了一些功能,发现某些连接不可用,并且会发生错误。 http://127.0.0.1/admin/ssccapp/huodong/add/ http://127.0.0.1/admin/ssccapp/huodong/1/change/

0 个答案:

没有答案