#NEWLINE# def ensure_roa_manager( sender , **kwargs ) : #NEWLINE# #INDENT# cls = sender #NEWLINE# manager = getattr ( cls , '_default_manager' , None ) #NEWLINE# if ( ( ( not kwargs ) and ( not cls . _meta . abstract ) ) or ( ROA_MODELS and hasattr ( cls , 'get_resource_url_list' ) and ( not hasattr ( manager , 'is_roa_manager' ) ) ) ) : #NEWLINE# #INDENT# cls . add_to_class ( 'objects' , Manager ( ) ) #NEWLINE# cls . add_to_class ( '_default_manager' , Manager ( ) )