Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions examples/blog/src/blog/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from pathlib import Path
from sqlite3 import dbapi2 as sqlite3

from quart import g
Expand All @@ -11,7 +12,7 @@

app.config.update(
{
"DATABASE": app.root_path / "blog.db",
"DATABASE": Path(app.root_path) / "blog.db",
}
)

Expand Down Expand Up @@ -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()

Expand Down
Loading