Made the form display on the setup view display the function's docstring by default

This commit is contained in:
Roberto Rosario
2011-04-20 02:46:37 -04:00
parent e7c580f1a8
commit 2843e14dc3
2 changed files with 13 additions and 4 deletions

View File

@@ -120,7 +120,7 @@ def check_settings(request):
def _return_type(value):
if isinstance(value, types.FunctionType):
return _(u'function found')
return value.__doc__ if value.__doc__ else _(u'function found')
elif isinstance(value, types.ClassType):
return _(u'class found: %s') % unicode(value).split("'")[1].split('.')[-1]
elif isinstance(value, types.TypeType):