Django+Postgres: “current transaction is aborted, commands ignored until end of transaction block”

后端 未结 9 1508
暖寄归人
暖寄归人 2020-12-12 11:39

I\'ve started working on a Django/Postgres site. Sometimes I work in manage.py shell, and accidentally do some DB action that results in an error. Then I am una

9条回答
  •  醉酒成梦
    2020-12-12 11:50

    this happens to me sometimes, often it's the missing

    manage.py migrate 
    

    or

    manage.py syncdb
    

    as mentioned also here

    it also can happen the other way around, if you have a schemamigration pending from your models.py. With south you need to update the schema with.

    manage.py schemamigration mymodel --auto
    

提交回复
热议问题