'Determine a link description.
This will be based on the method docstring if one exists,
or else the class docstring.'

def get_description(self, path, method, view):

    method_name = getattr(view, 'action', method.lower())
    method_docstring = getattr(view, method_name, None).__doc__
    if method_docstring:
        return formatting.dedent(smart_text(method_docstring))
    description = view.get_view_description()
    lines = [line.strip() for line in description.splitlines()]
    current_section = ''
    sections = {'': ''}
    for line in lines:
        if header_regex.match(line):
            (current_section, seperator, lead) = line.partition(':')
            sections[current_section] = lead.strip()
        else:
            sections[current_section] += ('\n' + line)
    header = getattr(view, 'action', method.lower())
    if (header in sections):
        return sections[header].strip()
    if (header in self.coerce_method_names):
        if (self.coerce_method_names[header] in sections):
            return sections[self.coerce_method_names[header]].strip()
    return sections[''].strip()
