@contextfunction
def show_hint(context, hint=None, object=None):
 request = context['request']
 response_format = 'html'
 user = None
 if request.user.username:
  try:
   user = request.user.profile
  except Exception:
   pass
 return Markup(render_to_string(('core/hints/' + hint), {'user': user, 'object': object}, response_format=response_format))

@ contextfunction def show_hint ( context , hint = None , object = None ) : request = context [ 'request' ] response_format = 'html' user = None if request . user . username : try : user = request . user . profile except Exception : pass return Markup ( render_to_string ( ( 'core/hints/' + hint ) , { 'user' : user , 'object' : object } , response_format = response_format ) )
generic hint framework .