title: Django ORM without HTTP and commit_on_success decorator
body: <p>I'm trying to use Django's ORM in my non-HTTP part of project. </p>
  
  <p>In one function I need to make bulk inserts of data, so commit_on_success decorator is what I need.</p>
  
  <p>But I've found that this decorator doesn't do what supposed (didn't rollback transaction on error).</p>
  
  <p>I've go into this decorator with debugger, I've fount thar reason is in this code:</p>
  
  <pre><code>if is_dirty():
      rollback()
  </code></pre>
  
  <p>Is dirty allways return true, so Django thought that transaction is allways clean.</p>
  
  <p>And I'm geting "InternalError: current transaction is aborted, commands ignored until end of transaction block"</p>
  
  <p>What can I do with this issue? </p>