标签:
在定义Model之后使用syncdb 同步的时候报出这个错误,检查之后发现是用错了。在model的Meta里面,排序这些用的应该是
ordering = [‘last‘,‘first‘,‘middle‘] unique_together = [‘first‘,‘last‘,‘middle‘] verbose_name_plural = "people"
如果是误写成
ordering = {‘last‘,‘first‘,‘middle‘}
unique_together = {‘first‘,‘last‘,‘middle‘}
verbose_name_plural = "people"
会出现 ‘set‘ object does not support indexing
django 'set' object does not support indexing
标签:
原文地址:http://www.cnblogs.com/EncryptingLife/p/4740954.html