flask-blog
flask-blog copied to clipboard
Get_all_posts only ever returns one entry
May only apply to SQLite engine
It's weird because:
>>> from models.interface import DatabaseInterface
>>> import settings
>>> db = DatabaseInterface(settings.DATABASE_ENGINE, settings.DATABASE_CONNECTION_STRING)
>>> db.engine.get_all_posts()
[<models.sqlite.Post object at 0x7f9c181da0d0>]
>>> # returns just one. WTF?
>>> var c = db.engine.cursor.execute("""SELECT rowid, name, title, content, user, updated, published FROM posts""") # same SQL statement run on the cursor
>>> len(c)
7
>>> # how is that possible?