django 'set' object does not support indexing
在定义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
下一个问题,才是最难的