From 864321a45be68f770f7deef067c67aadd7aaf41a Mon Sep 17 00:00:00 2001 From: "Waylon S. Walker" Date: Fri, 9 Jun 2023 16:07:41 -0500 Subject: [PATCH] import hero_app --- .pyflyby | 3 +++ templates/model/.pyflyby-{{modelname.lower()}}.jinja | 4 +++- tests/test_hero.py | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.pyflyby b/.pyflyby index 5e453ff..048eee1 100644 --- a/.pyflyby +++ b/.pyflyby @@ -19,3 +19,6 @@ from learn_sql_model.models.new import newDelete from learn_sql_model.models.new import newRead from learn_sql_model.models.new import newUpdate from learn_sql_model.models.pet import Pet +from learn_sql_model.cli.hero import hero_app +from learn_sql_model.api.hero import hero_router + diff --git a/templates/model/.pyflyby-{{modelname.lower()}}.jinja b/templates/model/.pyflyby-{{modelname.lower()}}.jinja index ee3e946..7781ca3 100644 --- a/templates/model/.pyflyby-{{modelname.lower()}}.jinja +++ b/templates/model/.pyflyby-{{modelname.lower()}}.jinja @@ -1,5 +1,7 @@ +from learn_sql_model.api.{{modelname.lower()}} import {{modelname.lower()}}_router +from learn_sql_model.cli.{{modelname.lower()}} import {{modelname.lower()}}_app from learn_sql_model.models.{{modelname.lower()}} import {{modelname}} from learn_sql_model.models.{{modelname.lower()}} import {{modelname}}Create +from learn_sql_model.models.{{modelname.lower()}} import {{modelname}}Delete from learn_sql_model.models.{{modelname.lower()}} import {{modelname}}Read from learn_sql_model.models.{{modelname.lower()}} import {{modelname}}Update -from learn_sql_model.models.{{modelname.lower()}} import {{modelname}}Delete diff --git a/tests/test_hero.py b/tests/test_hero.py index 261ac61..d65c665 100644 --- a/tests/test_hero.py +++ b/tests/test_hero.py @@ -6,6 +6,7 @@ from sqlmodel.pool import StaticPool from typer.testing import CliRunner from learn_sql_model.api.app import app +from learn_sql_model.cli.hero import hero_app from learn_sql_model.config import get_config, get_session from learn_sql_model.factories.hero import HeroFactory from learn_sql_model.models.hero import Hero