天天看点

django error

错误信息:You're using the Django "sites framework" without having set the SITE_ID setting. Create a site in your database and set the SITE_ID setting to fix this error.

  原因:settings.py里# Application definition中添加了'django.contrib.sites'模块后需要设置SITE_ID 

  处理:在settings.py里添加配置:SITE_ID = 1

Database returned an invalid value in QuerySet.datetimes(). Are time zone definitions for your database and pytz installed?

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql  

本文转自 Art_Hero 51CTO博客,原文链接:http://blog.51cto.com/curran/1600334,如需转载请自行联系原作者

上一篇: python