'Makes sure the following commands are inside a transaction.
Must be followed by a (commit|rollback)_transaction call.'

def start_transaction(self):

    if self.dry_run:
        self.pending_transactions += 1
    transaction.commit_unless_managed(using=self.db_alias)
    transaction.enter_transaction_management(using=self.db_alias)
    transaction.managed(True, using=self.db_alias)
