parameters: (self)
docstring: Serve the settings page
docstring_summary: Serve the settings page
docstring_tokens: Serve the settings page
function: def _serve_settings(self):
          ''' Serve the settings page '''
          db = View.get().db
          settings = db.load_settings()
          s = []
  
          for name, value in settings.items():
              if isinstance(value, list):
                  s.append('<tr><td>%s</td><td><i>%s</i></td></tr>'
                           % (html.escape(name),
                              html.escape(json.dumps(value))))
              else:
                  s.append('<tr><td>%s</td><td><i>%s</i></td></tr>'
                           % (html.escape(name),
                              html.escape(str(value))))
  
          self._write_template('settings.html', {'settings': '\n\t'.join(s)})
function_tokens: def _serve_settings ( self ) : db = View . get ( ) . db settings = db . load_settings ( ) s = [ ] for name , value in settings . items ( ) : if isinstance ( value , list ) : s . append ( '<tr><td>%s</td><td><i>%s</i></td></tr>' % ( html . escape ( name ) , html . escape ( json . dumps ( value ) ) ) ) else : s . append ( '<tr><td>%s</td><td><i>%s</i></td></tr>' % ( html . escape ( name ) , html . escape ( str ( value ) ) ) ) self . _write_template ( 'settings.html' , { 'settings' : '\n\t' . join ( s ) } )