code: def configure_error_handlers(app):
      
  
      def render_error(error):
          return (render_template('errors/%s.html' % error.code,
                  title=error_messages[error.code], code=error.code), error.code)
  
      for (errcode, title) in error_messages.iteritems():
          app.errorhandler(errcode)(render_error)
docs: Configure application error handlers