def get_default_base_name(self, viewset):
        model_cls = getattr(viewset, 'model', None)
        queryset = getattr(viewset, 'queryset', None)
        if model_cls is None and queryset is not None:
            model_cls = queryset.model

        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.'

        return model_cls._meta.object_name.lower()
If `base_name` is not specified, attempt to automatically determine
dataset/ETHPy150Open globocom/database-as-a-service/dbaas/api/renderers.py/JSONHalRenderer.get_default_base_name