[models] move Models into their own module
This commit is contained in:
parent
221062ead5
commit
59d668ba9c
3 changed files with 59 additions and 3 deletions
|
|
@ -16,8 +16,7 @@ from textual.widgets import (
|
|||
Input,
|
||||
Static,
|
||||
)
|
||||
from tortoise import Tortoise, fields
|
||||
from tortoise.models import Model
|
||||
from tortoise import Tortoise
|
||||
|
||||
|
||||
@final
|
||||
|
|
@ -101,7 +100,8 @@ class AddInventoryScreen(Screen[None]):
|
|||
class SammlerApp(App[None]):
|
||||
async def on_mount(self) -> None:
|
||||
await Tortoise.init(
|
||||
db_url="sqlite://db.sqlite3", modules={"models": ["teilchensammler_cli"]}
|
||||
db_url="sqlite://db.sqlite3",
|
||||
modules={"models": ["teilchensammler_cli.models"]},
|
||||
)
|
||||
await Tortoise.generate_schemas()
|
||||
_ = self.push_screen(AddInventoryScreen())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue