title: Transaction managed block ended with pending COMMIT/ROLLBACK
body: <p>I have a view function:</p>
  
  <pre><code>@transaction.commit_manually
  def xyz(request):
      if ABC:
          success = something()
  
          if success:
              status = "success"
              transaction.commit()
  
          else:
              status = "dataerrors"
              transaction.rollback()
      else:
          status = "uploadproblem"
          transaction.rollback()
  
      return render(request, "template.html", {
          'status': status,
      })
  </code></pre>
  
  <p>I believe every code path ends the transaction one way or another. But Django seems to be complaining that it doesn't. Any ideas?</p>
  
  <pre><code>Django Version:     1.3
  Exception Type:     TransactionManagementError
  Exception Value:    Transaction managed block ended with pending COMMIT/ROLLBACK
  </code></pre>
  
  <p>EDIT: No other exceptions are being thrown to alter the code path.</p>