From fbdfa2927f69d05b4a1c9c3cf2162fcc94d6e3c3 Mon Sep 17 00:00:00 2001 From: / Date: Thu, 4 Jun 2026 21:45:07 -0500 Subject: [PATCH] docs: fix typos in errorhandling.rst and views.rst --- docs/errorhandling.rst | 6 +++--- docs/views.rst | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/errorhandling.rst b/docs/errorhandling.rst index faca58c2..6d89ffeb 100644 --- a/docs/errorhandling.rst +++ b/docs/errorhandling.rst @@ -11,7 +11,7 @@ errors: reading from the incoming data - the database server was overloaded and could not handle the query - a filesystem is full -- a harddrive crashed +- a hard drive crashed - a backend server overloaded - a programming error in a library you are using - network connection of the server to another system failed @@ -280,7 +280,7 @@ username and we can't find it, we raise a "404 Not Found". # a successful request would be like /profile?username=jack @app.route("/profile") def user_profile(): - username = request.arg.get("username") + username = request.args.get("username") # if a username isn't supplied in the request, return a 400 bad request if username is None: abort(400) @@ -494,7 +494,7 @@ This is a simple example: # a correct request might be /api/user?user_id=420 @app.route("/api/user") def user_api(user_id): - user_id = request.arg.get("user_id") + user_id = request.args.get("user_id") if not user_id: raise InvalidAPIUsage("No user id provided!") diff --git a/docs/views.rst b/docs/views.rst index f2210270..0bc95a13 100644 --- a/docs/views.rst +++ b/docs/views.rst @@ -112,7 +112,7 @@ function. self.model = model self.template = f"{model.__name__.lower()}/detail.html" - def dispatch_request(self, id) + def dispatch_request(self, id): item = self.model.query.get_or_404(id) return render_template(self.template, item=item)