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

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

Asked on January 9, 2019 in PostgreSQL.
Add Comment


  • 2 Answer(s)

    This appear to me few times, often it’s the missing

    manage.py migrate
    

    Another one

    manage.py syncdb
    

    as specified also here

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

    manage.py schemamigration mymodel --auto
    

     

    Answered on January 9, 2019.
    Add Comment

    The active solution is commonly to turn on database level autocommit by adding:

    'OPTIONS': {'autocommit': True,}
    
    

    To the database settings.

    Answered on January 9, 2019.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.