def reversion_register(model_class, fields=None, follow=(), format='json', exclude_fields=None):
 if (not is_installed('reversion')):
  return
 if (fields and exclude_fields):
  raise ValueError('Just one of fields, exclude_fields arguments can be passed.')
 opts = model_class._meta
 local_fields = (opts.local_fields + opts.local_many_to_many)
 if (fields is None):
  fields = [field.name for field in local_fields]
 exclude_fields = (exclude_fields or [])
 fields = filter((lambda name: (not (name in exclude_fields))), fields)
 from cms.utils import reversion_hacks
 reversion_hacks.register_draft_only(model_class, fields, follow, format)

def reversion_register ( model_class , fields = None , follow = ( ) , format = 'json' , exclude_fields = None ) : if ( not is_installed ( 'reversion' ) ) : return if ( fields and exclude_fields ) : raise ValueError ( 'Just one of fields, exclude_fields arguments can be passed.' ) opts = model_class . _meta local_fields = ( opts . local_fields + opts . local_many_to_many ) if ( fields is None ) : fields = [ field . name for field in local_fields ] exclude_fields = ( exclude_fields or [ ] ) fields = filter ( ( lambda name : ( not ( name in exclude_fields ) ) ) , fields ) from cms . utils import reversion_hacks reversion_hacks . register_draft_only ( model_class , fields , follow , format )
cms interface to reversion api - helper function .