blog_engine.get_posts() falls with 'SQLAStorage' object is not callable
UnoYakshi opened this issue · 1 comments
UnoYakshi commented
In a custom view.py
I do:
from app import db, blogging_engine, login_manager
# ...
@news_bp.route('/posts')
def index():
try:
# Get all posts...
posts = blogging_engine.get_posts(count=None)
return render_template('posts.html', posts=posts)
except Exception as excpt:
return 'Exception: {}'.format(str(excpt))
and it falls with 'SQLAStorage' object is not callable
.
Either it is a bug, or I do something wrong.
UnoYakshi commented
My fault. Should be posts = blogging_engine.storage.get_posts(count=None)
instead.