I'm running code from the manage.py shell to load stuff (from an XML export from an excel read of a SQL Server dump, of all things), which gets a database error (Postgersql correctly noticing that a value is too long for a field, for instance) upon calling the save method of a model. I'd like to catch the exception, log about what instance failed, and continue.
But now the db connection is within a transaction, which I assume needs to be rolled back, and the connection won't talk to me until I do so. The trouble is, I don't know how. Just calling django.db.transaction.rollback() doesn't work, and neither do several other guesses. I presume that the view decorators won't do it since this isn't a request coming through the middleware to a view function. Can someone tell me the appropriate incantations? Bill -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.