Beispiel #1
0
 def _get_method_docstring(self, view, method):
     method_name = getattr(view, 'action', method.lower())
     method_docstring = getattr(view, method_name, None).__doc__
     if method_docstring:
         # An explicit docstring on the method or action.
         return formatting.dedent(smart_text(method_docstring))
Beispiel #2
0
 def _get_method_docstring(self, view, method):
     method_name = getattr(view, 'action', method.lower())
     method_docstring = getattr(view, method_name, None).__doc__
     if method_docstring:
         # An explicit docstring on the method or action.
         return formatting.dedent(smart_text(method_docstring))