Django: Fix "OperationalError: database is locked" error

If you're using the shell to do some testing, this error could cause you some grief and set you back by forcing you to start the terminal.

Thankfully, the solution is short.

Just paste in this snippet and it'll be rolled back to a usable state.

from django.db import transaction
transaction.rollback()

Sources

 
Copyright © Twig's Tech Tips
Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog