This is the transaction-method of django 1.6. This would be the first line of code that does not support django 1.5 anymore. Therefor I would prefer, that you use the the old transaction way, like in motion/csv_import.py.