def respond_as_web_page(title, html, success=None, http_status_code=None, context=None, indicator_color=None, primary_action=u'/', primary_label=None, fullpage=False):
 local.message_title = title
 local.message = html
 local.response[u'type'] = u'page'
 local.response[u'route'] = u'message'
 if http_status_code:
  local.response[u'http_status_code'] = http_status_code
 if (not context):
  context = {}
 if (not indicator_color):
  if success:
   indicator_color = u'green'
  elif (http_status_code and (http_status_code > 300)):
   indicator_color = u'red'
  else:
   indicator_color = u'blue'
 context[u'indicator_color'] = indicator_color
 context[u'primary_label'] = primary_label
 context[u'primary_action'] = primary_action
 context[u'error_code'] = http_status_code
 context[u'fullpage'] = fullpage
 local.response[u'context'] = context

def respond_as_web_page ( title , html , success = None , http_status_code = None , context = None , indicator_color = None , primary_action = u'/' , primary_label = None , fullpage = False ) : local . message_title = title local . message = html local . response [ u'type' ] = u'page' local . response [ u'route' ] = u'message' if http_status_code : local . response [ u'http_status_code' ] = http_status_code if ( not context ) : context = { } if ( not indicator_color ) : if success : indicator_color = u'green' elif ( http_status_code and ( http_status_code > 300 ) ) : indicator_color = u'red' else : indicator_color = u'blue' context [ u'indicator_color' ] = indicator_color context [ u'primary_label' ] = primary_label context [ u'primary_action' ] = primary_action context [ u'error_code' ] = http_status_code context [ u'fullpage' ] = fullpage local . response [ u'context' ] = context
send response as a web page with a message rather than json .