2

I have a sqlite3 database but the database is only getting updated when I restart the Flask server.

I think it is because I don't tell Flask that it is a database. So I started using SQLAlchemy and set

    db = SQLAlchemy(app)

but SQLAlchemy uses pysqlite2 and pysqlite2 will not work on my computer.

Is there a way to use APSW (another python sqlite3 wrapper) with SQLALchemy?

Or is there a way to tell flask to use my database without SQLAlchemy?

or is my problem of the database not updating fixed another way?

VLAZ
  • 26,331
  • 9
  • 49
  • 67
Siecje
  • 3,594
  • 10
  • 32
  • 50

1 Answers1

-1

Just use this flask tutorial. It uses sqlite and there is no use of sqlalchemy.

http://flask.pocoo.org/docs/tutorial/

codegeek
  • 32,236
  • 12
  • 63
  • 63
  • http://flask.pocoo.org/docs/tutorial/views/#tutorial-views I don't see them doing anything special, my database won't update until I restart he webserver – Siecje Jan 31 '13 at 18:34
  • ok. then please post your code so that we can see where the issue is. – codegeek Jan 31 '13 at 20:22
  • This does not demonstrate using `apsw` with Flask or at all. Even if it did, this violates the principle of not simply posting links but extracting their relevant content. To be fair, I suppose OP asked several questions and this arguably might be related to answering one of them. – ijoseph Nov 04 '20 at 23:08