def atomic_with_signals(func):
    """
    Atomic decorator with transaction signals.
    """
    try:
        from reversion.revisions import create_revision

        return transaction.atomic(create_revision()(transaction_signals(func)))
    except ImportError:
        return transaction.atomic(transaction_signals(func))
def atomic_with_signals ( func ) : try : from reversion . revisions import create_revision return transaction . atomic ( create_revision ( ) ( transaction_signals ( func ) ) ) except ImportError : return transaction . atomic ( transaction_signals ( func ) )
Atomic decorator with transaction signals.