对于错误"
Incorrect string value: '\xE6\xA2\xB5\xE8\x92\x82...'for column 'object_repr' at row 1
解决方法是设置django_admin_log表的object_repr一项使用utf8_unicode_ci;
对于错误" Incorrect string value: '\xE6\xA2\xB5\xE8\x92\x82...'for column 'change_message' at row 1 “
解决方法是设置django_admin_log表的change_message一项使用utf8_unicode_ci;
具体mysql语句为:mysql> ALTER TABLE django_admin_log MODIFY COLUMN object_repr VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
mysql > ALTER TABLE django_admin_log MODIFY COLUMN change_message VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
对应修改上面的表名和字段即可
来源:oschina
链接:https://my.oschina.net/u/1241293/blog/296593