Skip to content

Commit

Permalink
added DB transactions support for importing data
Browse files Browse the repository at this point in the history
  • Loading branch information
bmihelac committed Jan 22, 2013
1 parent 40fefc1 commit 85be20c
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Change Log
0.1.3 (not released)
====================

* DB transactions support for importing data

0.1.2
=====

Expand Down
8 changes: 8 additions & 0 deletions docs/import_workflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,12 @@ responsible for import data from given `dataset`.

#. ``result`` is returned.

Transaction support
-------------------

If transaction support is enabled, whole import process is wrapped inside
transaction and rollbacked or committed respectively.
All methods called from inside of ``import_data`` (create / delete / update)
receive ``False`` for ``dry_run`` argument.

.. _Dataset: http://docs.python-tablib.org/en/latest/api/#dataset-object
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ User Guide
getting_started
import_workflow
example_app
settings
todo
contributing
changelog
Expand Down
7 changes: 7 additions & 0 deletions docs/settings.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
========
Settings
========

``IMPORT_EXPORT_USE_TRANSACTIONS``
Global setting controls if resource importing should use database
transactions. Default is ``False``.
1 change: 0 additions & 1 deletion docs/todo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
TODO
====

* DB transactions support for importing data

0 comments on commit 85be20c

Please sign in to comment.