#NEWLINE# def get_default_base_name( self , viewset ) : #NEWLINE# #INDENT# '\n        If `base_name` is not specified, attempt to automatically determine\n        it from the viewset.\n        ' #NEWLINE# model_cls = getattr ( viewset , 'model' , None ) #NEWLINE# queryset = getattr ( viewset , 'queryset' , None ) #NEWLINE# if ( ( model_cls is None ) and ( queryset is not None ) ) : #NEWLINE# #INDENT# model_cls = queryset . model #NEWLINE# #UNINDENT# assert model_cls , '`base_name` argument not specified, and could not automatically determine the name from the viewset, as it does not have a `.model` or `.queryset` attribute.' #NEWLINE# return model_cls . _meta . object_name . lower ( )