UnknownTimeZoneError when using RequestContext

自作多情 提交于 2019-12-06 16:24:45

If you don't care about timezone support you should add USE_TZ = False to your settings.py.

If you want timezone support you should install pytz:

pip install pytz

I believe the error is caused by django getting America/Chicago in the template from the request, but django's limited timezone data doesn't have this timezone. The error will go away if pytz is installed.

You should read django's timezone docs to learn how django 1.4 handles timezones.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!