Closed rufuspollock closed 12 years ago
@marians this is great and setting up the db is really easy, I think you just do:
db.create_all()
See http://packages.python.org/Flask-SQLAlchemy/quickstart.html#a-minimal-application
The question is: Do we want database initialization as part of the application, as the result of a self-check? If yes, I'm not sure how to test if the database has been initialized already. Or do we want it as part of an install routine or part of the README?
create_all is silent ...
Code including db.create_all() is now committed.
FIXED. While we could definitely refactor this to be nicer the system is operational :-)
I made a first round of changes and committed the code. What I don't know yet is how to do the database initialization in a proper SQLalchemic way.
https://github.com/okfn/yourtopia/blob/master/yourtopia/web.py#L413