Merge branch '2.2.x'

This commit is contained in:
David Lord 2022-12-24 11:21:59 -07:00
commit 7464e17c5e
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
16 changed files with 41 additions and 35 deletions

View file

@ -248,7 +248,7 @@ HTML ``<script>`` tags.
.. sourcecode:: html+jinja
<script>
const names = {{ names|tosjon }};
const names = {{ names|tojson }};
renderChart(names, {{ axis_data|tojson }});
</script>

View file

@ -47,7 +47,7 @@ Debug Mode
The :data:`DEBUG` config value is special because it may behave inconsistently if
changed after the app has begun setting up. In order to set debug mode reliably, use the
``--debug`` option on the ``flask`` command.``flask run`` will use the interactive
``--debug`` option on the ``flask`` command. ``flask run`` will use the interactive
debugger and reloader by default in debug mode.
.. code-block:: text

View file

@ -212,7 +212,7 @@ class's :meth:`~views.View.as_view` method.
def __init__(self, model):
self.model = model
def get(id):
def get(self, id):
post = self.model.query.get(id)
return jsonify(post.to_json())

View file

@ -93,7 +93,7 @@ exist yet, it is dynamically created and remembered::
from threading import Lock
class SubdomainDispatcher(object):
class SubdomainDispatcher:
def __init__(self, domain, create_app):
self.domain = domain
@ -148,7 +148,7 @@ request path up to the first slash::
from threading import Lock
from werkzeug.wsgi import pop_path_info, peek_path_info
class PathDispatcher(object):
class PathDispatcher:
def __init__(self, default_app, create_app):
self.default_app = default_app

View file

@ -256,7 +256,7 @@ provide get (list) and post (create) methods.
return self.model.query.get_or_404(id)
def get(self, id):
user = self._get_item(id)
item = self._get_item(id)
return jsonify(item.to_json())
def patch(self, id):