mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Add 2022 year in review blog post
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
from rich.text import Text
|
||||
|
||||
@@ -64,7 +65,8 @@ class TreeApp(App):
|
||||
|
||||
def on_mount(self) -> None:
|
||||
"""Load some JSON when the app starts."""
|
||||
with open("food.json") as data_file:
|
||||
file_path = Path(__file__).parent / "food.json"
|
||||
with open(file_path) as data_file:
|
||||
self.json_data = json.load(data_file)
|
||||
|
||||
def action_add(self) -> None:
|
||||
|
||||
Reference in New Issue
Block a user