def get_view_description(view_cls, html=False):
 description = (view_cls.__doc__ or '')
 description = formatting.dedent(smart_text(description))
 if hasattr(view_cls, 'serializer_class'):
  doc_url = get_doc_url('api{0}s'.format(view_cls.serializer_class.Meta.model.__name__.lower()))
 else:
  doc_url = get_doc_url('api')
 description = '\n\n'.join((description, DOC_TEXT.format(doc_url)))
 if html:
  return formatting.markup_description(description)
 return description

def get_view_description ( view_cls , html = False ) : description = ( view_cls . __doc__ or '' ) description = formatting . dedent ( smart_text ( description ) ) if hasattr ( view_cls , 'serializer_class' ) : doc_url = get_doc_url ( 'api{0}s' . format ( view_cls . serializer_class . Meta . model . __name__ . lower ( ) ) ) else : doc_url = get_doc_url ( 'api' ) description = '\n\n' . join ( ( description , DOC_TEXT . format ( doc_url ) ) ) if html : return formatting . markup_description ( description ) return description
given a view class .