Closed ran-guin closed 10 months ago
I just realized that the database file is created in the instance/ directory.
This is fine, but it could probably be made more clear (along with the tweaks required to fix the create_all() command) that this is where it is going since this is not where it goes in the video.
Otherwise, I did find the video extremely useful and an excellent starting point for anyone wishing to get up and running quickly with python.
Thanks very much for putting this together !
Note: I'd propose putting updates regarding the above issues in the README.md file. (as well as any other tweaks that might be required for newer versions of flask/SQLAlchemy/Python etc). That could save people from having to search through the issues. ... just a constructive suggestion for what is otherwise a very well put together template.
I have updated the create_database function after googling the initial problem that others seem to have encountered with the create_app() call.
I no longer get any errors but there is no database file created.
(I did notice someone on a forum somewhere had trouble when trying to do this on a Mac, but no further explanation or solution) - I am running this on an old(ish) Macbook Air, though not sure why that would be a problem.
Here is the current function (which is being executed - ie the "Created Database" message is generated at runtime) ...