def atomic(func):
try:<EOL><INDENT>from reversion.revisions import create_revision<EOL>return transaction.atomic(create_revision()(func))<EOL><DEDENT>except ImportError:<EOL><INDENT>return transaction.atomic(func)<EOL><DEDENT>
Decorator helper that overrides django atomic decorator and automatically adds create revision.