diff --git a/examples/blog/src/blog/__init__.py b/examples/blog/src/blog/__init__.py index 47cd836..6f17263 100644 --- a/examples/blog/src/blog/__init__.py +++ b/examples/blog/src/blog/__init__.py @@ -1,3 +1,4 @@ +from pathlib import Path from sqlite3 import dbapi2 as sqlite3 from quart import g @@ -11,7 +12,7 @@ app.config.update( { - "DATABASE": app.root_path / "blog.db", + "DATABASE": Path(app.root_path) / "blog.db", } ) @@ -57,7 +58,7 @@ async def create(): def init_db(): db = _connect_db() - with open(app.root_path / "schema.sql") as file_: + with open(Path(app.root_path) / "schema.sql") as file_: db.cursor().executescript(file_.read()) db.commit()