mirror of https://github.com/pallets/flask.git
Fix class-based views example
This commit is contained in:
parent
618fdc8600
commit
9a294a6401
|
@ -212,7 +212,7 @@ class's :meth:`~views.View.as_view` method.
|
||||||
def __init__(self, model):
|
def __init__(self, model):
|
||||||
self.model = model
|
self.model = model
|
||||||
|
|
||||||
def get(id):
|
def get(self, id):
|
||||||
post = self.model.query.get(id)
|
post = self.model.query.get(id)
|
||||||
return jsonify(post.to_json())
|
return jsonify(post.to_json())
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue