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