class Article(models.Model):
title = models.Attribute()
tags = models.ListField(unicode)
new = Article(title='what ever')
new.tags = [ u'Niña', u'Niñb' ]
new.is_validate()
>>> True
new.save()
加载时:</p>
Article.objects.all()
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 0: ordinal not in range(128)
在 redis-cli 中:
redis 127.0.0.1:6379> GET "Article:tags:5omv5reh"
(error) ERR Operation against a key holding the wrong kind of value
那么造成这种情况的原因是什么?