在定义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的更多相关文章

  1. appium 与 selenium python解决python 'WebElement' object does not support indexing 报错问题问题

    再用selenium编写测试脚本时,发现出现python 'WebElement' object does not support indexing 报错问题问题,再找一些解决方法时,发现Appium ...

  2. 'dict_values' object does not support indexing, Python字典dict中由value查key

    Python字典dict中由value查key 众所周知,字典dict最大的好处就是查找或插入的速度极快,并且不想列表list一样,随着key的增加越来越复杂.但是dict需要占用较大的内存空间,换句 ...

  3. Object level permissions support

    django-guardian (1.1.1+) - Object level permissions support. Home - Django REST framework https://ww ...

  4. TypeError: '_io.TextIOWrapper' object does not support item assignment

    纯小白 遇到的细节问题: 报错 一开始看到这个傻逼了 TypeError: '_io.TextIOWrapper' object does not support item assignment 其实 ...

  5. TypeError: 'range' object does not support item assignment处理方法

    vectorsum.py#!/usr/bin/env/pythonimport sysfrom datetime import datetimeimport numpy as np # def num ...

  6. python3中报错:TypeError: 'range' object doesn't support item deletion

    1.源代码 以下代码执行时会报  range' object does not support item assignment 的错误,问题出现在第17行的runge(10): import unit ...

  7. TypeError: 'range' object does not support item assignment

    TypeError: 'range' object does not support item assignment I was looking at some python 2.x code and ...

  8. GraphQL: Object doesn't support property or method 'from'

    From: https://github.com/graphql/graphiql/issues/688 psyCodelist commented 11 days ago Hi, Thank you ...

  9. TypeError: 'range' object doesn't support item deletion

    python 是个逐步迭代开发的过程,他不是向下兼容的,更不是向上兼容,版本不一致,好端端的程序就是不能运行了. 下面是在python 2中能运行,在Python 3中不能运行的代码.其实也很简单.但 ...

随机推荐

  1. 【Oracle】Oracle 10g利用闪回挽救误删的数据

    我们在开发和运维过程中,经常遇到数据被误删除的情况.无论是在应用开发中的Bug,还是修改数据的时候,如果提交了错误数据修改结果,会带来很多问题.一般来说,一旦提交commit事务,我们是不能获取到之前 ...

  2. leetcode357

    public class Solution { public int CountNumbersWithUniqueDigits(int n) { ) { ; } ; ; ; && av ...

  3. Excel VBA入门(一)数据类型

    与其它的编程语言一样,VBA也有它自己的数据类型.讲到数据类型,就离不开"变量"与"常量"这两个概念,变量与常量,都是用于保存数据的.顾名思义,"变量 ...

  4. Nginx 源码完全注释(10)ngx_radix_tree

    ngx_radix_tree.h // 未被使用的节点 #define NGX_RADIX_NO_VALUE (uintptr_t) -1 typedef struct ngx_radix_node_ ...

  5. Mysql 查询今天的某些时间之外的数据

    SELECT * FROM `attendancealert` WHERE DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP(`AlertTime`)),'%Y-%m- ...

  6. mysql oracle计算两点之间的距离

    mysql函数: SET FOREIGN_KEY_CHECKS=0; DROP FUNCTION IF EXISTS `getDistance`;DELIMITER ;;CREATE DEFINER= ...

  7. 346. Moving Average from Data Stream数据窗口流中位数的数据结构设计

    [抄题]: Given a stream of integers and a window size, calculate the moving average of all integers in ...

  8. 解题报告Best Time to Buy and Sell Stock with Cooldown

    题目 Say you have an array for which the ith element is the price of a given stock on day i. Design an ...

  9. swiper 下拉刷新混乱

    在下来刷新时,banner轮播图播放混乱: 添加判断 if(this.mySwiper.activeIndex){ this.mySwiper.destroy(true,false);//这句是关键, ...

  10. ubuntu14.04安装chromium以及flash插件

    之前找了好几个方法都不还用,今天突然发现,还挺简单的.命令如下: sudo apt-get updatesudo apt-get install chromium-browser#sudo add-a ...