Skip to content

Commit 36653ff

Browse files
committed
Add app web support
1 parent 4403ac0 commit 36653ff

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

investing_algorithm_framework/cli/intialize_app.py

+14-17
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,6 @@ def create_file_from_template(template_path, output_path):
5858

5959

6060
def command(path = None, web = False):
61-
"""
62-
Command-line tool for creating an azure function enabled app skeleton.
63-
64-
Args:
65-
add_app_template (bool): Flag to create an app skeleton.
66-
add_requirements_template (bool): Flag to create a
67-
requirements template.
68-
69-
Returns:
70-
None
71-
"""
7261
"""
7362
Function to create an azure function app skeleton.
7463
@@ -90,12 +79,20 @@ def command(path = None, web = False):
9079
# Get the path of this script (command.py)
9180
current_script_path = os.path.abspath(__file__)
9281

93-
# Construct the path to the template file
94-
template_app_file_path = os.path.join(
95-
os.path.dirname(current_script_path),
96-
"templates",
97-
"app.py.template"
98-
)
82+
if web:
83+
# Construct the path to the template file
84+
template_app_file_path = os.path.join(
85+
os.path.dirname(current_script_path),
86+
"templates",
87+
"app-web.py.template"
88+
)
89+
else:
90+
# Construct the path to the template file
91+
template_app_file_path = os.path.join(
92+
os.path.dirname(current_script_path),
93+
"templates",
94+
"app.py.template"
95+
)
9996
requirements_path = os.path.join(
10097
os.path.dirname(current_script_path),
10198
"templates",

0 commit comments

Comments
 (0)