File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ usage: FastAPI template [-h] [--version] [--name PROJECT_NAME]
7171 [--orm {ormar,sqlalchemy,tortoise}]
7272 [--ci {none,gitlab,github}] [--redis] [--migrations]
7373 [--kube] [--dummy] [--routers] [--swagger] [--force]
74+ [--quite]
7475
7576optional arguments:
7677 -h, --help show this help message and exit
@@ -92,4 +93,5 @@ optional arguments:
9293 --routers Add exmaple routers
9394 --swagger Eanble self-hosted swagger
9495 --force Owerrite directory if it exists
96+ --quite Do not ask for feature during generation
9597` ` `
Original file line number Diff line number Diff line change @@ -118,6 +118,13 @@ def parse_args():
118118 default = False ,
119119 dest = "force" ,
120120 )
121+ parser .add_argument (
122+ "--quite" ,
123+ help = "Do not ask for feature during generation" ,
124+ action = "store_true" ,
125+ default = False ,
126+ dest = "quite" ,
127+ )
121128
122129 return parser .parse_args ()
123130
@@ -155,7 +162,7 @@ def ask_features(current_context: BuilderContext) -> BuilderContext:
155162 if feature ["value" ] is None :
156163 setattr (current_context , feature ["name" ], False )
157164 checkbox_values .append ((feature ["name" ], feature_name ))
158- if checkbox_values :
165+ if checkbox_values and not current_context . quite :
159166 results = checkboxlist_dialog (
160167 title = "Features" ,
161168 text = "What features do you wanna add?" ,
Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ class BuilderContext(BaseModel):
8787 add_dummy : Optional [bool ] = False
8888 self_hosted_swagger : Optional [bool ]
8989 force : bool = False
90+ quite : bool = False
9091
9192 class Config :
9293 orm_mode = True
You can’t perform that action at this time.
0 commit comments