How do I get Django to log why an sql transaction failed?
<p>I am trying to debug a Pootle (pootle is build on django) installation which fails with a django transaction error whenever I try to add a template to an existing language. Using the python debugger I can see that it fails when pootle tries to save a model as well as all the queries that have been made in that session.</p>

<p>What I can't see is <em>what specifically causes the save to fail</em>. I figure pootle/django must have added some database database constraint, how do I figure out which one? MySql (the database being used) apparently can't log just failed transactions.</p>

<p>Install django debug toolbar, you can easily check all of the queries that have been executed</p>

python mysql django pootle