def register_draft_only(model_class, fields, follow, format):
 if revision_manager.is_registered(model_class):
  raise RegistrationError(('%r has already been registered with Reversion.' % model_class))
 if (model_class._meta.proxy and (not revision_manager.is_registered(list(model_class._meta.parents.keys())[0]))):
  raise RegistrationError(('%r is a proxy model, and its parent has not been registered withReversion.' % model_class))
 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]
 fields = tuple(fields)
 follow = tuple(follow)
 try:
  registration_info = VersionAdapter(fields=fields, follow=follow, format=format, for_concrete_model=True, ignore_duplicates=False)
 except TypeError:
  registration_info = VersionAdapter(model_class)
  registration_info.fields = fields
  registration_info.follow = follow
  registration_info.format = format
 if hasattr(revision_manager, '_registration_key_for_model'):
  model_key = revision_manager._registration_key_for_model(model_class)
 else:
  model_key = model_class
 revision_manager._registered_models[model_key] = registration_info

def register_draft_only ( model_class , fields , follow , format ) : if revision_manager . is_registered ( model_class ) : raise RegistrationError ( ( '%r has already been registered with Reversion.' % model_class ) ) if ( model_class . _meta . proxy and ( not revision_manager . is_registered ( list ( model_class . _meta . parents . keys ( ) ) [ 0 ] ) ) ) : raise RegistrationError ( ( '%r is a proxy model, and its parent has not been registered withReversion.' % model_class ) ) 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 ] fields = tuple ( fields ) follow = tuple ( follow ) try : registration_info = VersionAdapter ( fields = fields , follow = follow , format = format , for_concrete_model = True , ignore_duplicates = False ) except TypeError : registration_info = VersionAdapter ( model_class ) registration_info . fields = fields registration_info . follow = follow registration_info . format = format if hasattr ( revision_manager , '_registration_key_for_model' ) : model_key = revision_manager . _registration_key_for_model ( model_class ) else : model_key = model_class revision_manager . _registered_models [ model_key ] = registration_info
version of the reversion register function that only registers drafts and ignores public models .