title: Working with pending trigger event in Django 1.4
body: <pre><code>@transaction.commit_on_success
  def action_init_address_receipt(cls, request):
      execute_sql('alter table finance_addressreceipts disable trigger user;')
      execute_sql('select init_address_receipt();')
  
      # next line below is where I get the pending trigger event Error
      execute_sql('alter table finance_addressreceipts enable trigger user;')
      return {'message': 'well done'}
  </code></pre>
  
  <p>I did some research and it appears that I need to do this in two separate transactions. I wonder if there are some better, elegant solutions to this.</p>