django博客搭建问题汇总

使用Django 搭建博客时遇到很多问题,在此记录一下备忘

1.时区问题
“Database returned an invalid value in QuerySet.dates(). Are time zone definitions and pytz installed?”
解决方法:
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql

2.上传图片时报错
python/django - “Cannot use ImageField because Pillow is not installed”
首先问题很明显:缺少Pillow
安装pip install Pillow
在编译过程中出现问题:
Fatal error: Python.h: No such file or Directory
解决:Python.h 需要安装 python-dev,不是说电脑可以使用python 就意味着有相关的头文件
pip install python-dev

3.访问时“网页无法显示”,查看后台提示:invalid request block size: 21573 (max 4096)...skip

原因:使用uwsgi时,参数-s表示以socket方式提供通信端口

解决方法:要是通过http访问,可以直接提供http服务,使用--http参数

Pingbacks are open.

Trackbacks
  1. mastertotobet on 05/29/2019 9:19 p.m. #

    ACLegend's Weblog - django博客搭建问题汇总

  2. insert your data on 05/31/2019 1:40 a.m. #

    ACLegend's Weblog - django博客搭建问题汇总

Trackback URL

Comments

15 Comments

  • gamefly free trial
    22 May 2019, 18:34 | Reply
    Can I just say what a relief to uncover an individual who actually understands what they're talking about on the web. You certainly know how to bring an issue to light and make it important. More people have to check this out and understand this side of your story. It's surprising you are not more popular since you most certainly have the gift.
  • gamefly free trial
    22 May 2019, 18:34 | Reply
    Can I just say what a relief to uncover an individual who actually understands what they're talking about on the web. You certainly know how to bring an issue to light and make it important. More people have to check this out and understand this side of your story. It's surprising you are not more popular since you most certainly have the gift.
  • how to get help in windows 10
    26 May 2019, 12:57 | Reply
    My spouse and I stumbled over here coming from a different page and thought I might check things out. I like what I see so now i'm following you. Look forward to finding out about your web page again.
  • how to get help in windows 10
    26 May 2019, 12:57 | Reply
    My spouse and I stumbled over here coming from a different page and thought I might check things out. I like what I see so now i'm following you. Look forward to finding out about your web page again.
  • 레깅스룸
    28 May 2019, 06:58 | Reply
    Hello there I am so excited I found your web site, I really found you by error, while I was researching on Google for something else, Anyways I am here now and would just like to say thanks for a remarkable post and a all round interesting blog (I also love the theme/design), I don’t have time to read it all at the minute but I have bookmarked it and also included your RSS feeds, so when I have time I will be back to read a lot more, Please do keep up the awesome work.
  • Togel Singapore
    29 May 2019, 06:21 | Reply
    I am regular reader, how are you everybody? This article posted at this site is truly pleasant.
  • mastertotobet
    29 May 2019, 21:19 | Reply
    ACLegend's Weblog - django博客搭建问题汇总
  • togel singapore online
    29 May 2019, 21:20 | Reply
    Wonderful beat ! I would like to apprentice whilst you amend your site, how could i subscribe for a weblog website? The account helped me a applicable deal. I have been tiny bit familiar of this your broadcast offered vivid transparent concept
  • togel singapore online
    29 May 2019, 21:21 | Reply
    Wonderful beat ! I would like to apprentice whilst you amend your site, how could i subscribe for a weblog website? The account helped me a applicable deal. I have been tiny bit familiar of this your broadcast offered vivid transparent concept
  • insert your data
    31 May 2019, 01:40 | Reply
    ACLegend's Weblog - django博客搭建问题汇总
  • Www.Indiascarves.Com
    01 Jun 2019, 02:29 | Reply
    insert your data Also visit my web blog: [Www.Indiascarves.Com](https://www.indiascarves.com/requestquote/insert-your-data-0 "Www.Indiascarves.Com")
  • Www.Indiascarves.Com
    01 Jun 2019, 02:29 | Reply
    insert your data Visit my blog post ... [Www.Indiascarves.Com](https://www.indiascarves.com/requestquote/insert-your-data-0 "Www.Indiascarves.Com")
  • http://bit.do/eUxhH
    12 Jun 2019, 02:32 | Reply
    First off I would like to say excellent blog! I had a quick question which I'd like to ask if you do not mind. I was curious to find out how you center yourself and clear your mind prior to writing. I have had trouble clearing my thoughts in getting my ideas out there. I truly do enjoy writing but it just seems like the first 10 to 15 minutes are usually lost simply just trying to figure out how to begin. Any suggestions or hints? Kudos!
  • http://bit.do/eUxhH
    12 Jun 2019, 02:32 | Reply
    First off I would like to say excellent blog! I had a quick question which I'd like to ask if you do not mind. I was curious to find out how you center yourself and clear your mind prior to writing. I have had trouble clearing my thoughts in getting my ideas out there. I truly do enjoy writing but it just seems like the first 10 to 15 minutes are usually lost simply just trying to figure out how to begin. Any suggestions or hints? Kudos!
  • BandarQ
    16 Jun 2019, 13:43 | Reply
    This is a topic which is close to my heart... Take care! Where are your contact details though?
Post your comment

cancel reply