gouthambs / Flask-Blogging

A Markdown Based Python Blog Engine as a Flask Extension.
http://flask-blogging.readthedocs.org/en/latest/
MIT License
688 stars 159 forks source link

blog_engine.get_posts() falls with 'SQLAStorage' object is not callable #114

Closed UnoYakshi closed 6 years ago

UnoYakshi commented 6 years ago

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 6 years ago

My fault. Should be posts = blogging_engine.storage.get_posts(count=None) instead.