【发布时间】:2016-01-22 14:24:06
【问题描述】:
我在 UserProfile 模型中这样做:
def repeated_times(self, test, date):
return self.user.user_test_results.filter(taken_date__month=date.month, djangotest=test).count()
但我得到了
'utf8' codec can't decode byte 0xe4 in position 169: invalid continuation byte
我错过了什么?
【问题讨论】:
-
我不想禁用 USE_TZ