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
manage.py shell
You can try this:
from django.db import connection connection._rollback()
The more detailed discussion of This issue can be found here