We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The blog tutorial has a section that imports pathlib.Path but doesn't use it, causing the lines where the path to the db and schema files fail.
pathlib.Path
from pathlib import Path from sqlite3 import dbapi2 as sqlite3 app.config.update({ "DATABASE": app.root_path / "blog.db", }) def _connect_db(): engine = sqlite3.connect(app.config["DATABASE"]) engine.row_factory = sqlite3.Row return engine def init_db(): db = _connect_db() with open(app.root_path / "schema.sql", mode="r") as file_: db.cursor().executescript(file_.read()) db.commit()
Environment:
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
The blog tutorial has a section that imports
pathlib.Path
but doesn't use it, causing the lines where the path to the db and schema files fail.Environment:
The text was updated successfully, but these errors were encountered: