def _get_detail_value(var, attr):
value = getattr(var, attr)<EOL>kls = getattr(getattr(value, '<STR_LIT>', '<STR_LIT>'), '<STR_LIT>', '<STR_LIT>')<EOL>if kls in ('<STR_LIT>', '<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>return kls<EOL><DEDENT>if callable(value):<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>return value<EOL>
Given a variable and one of its attributes that are available inside of
a template, return its 'method' if it is a callable, its class name if it
is a model manager, otherwise return its value