Add template name to reflex init success msg

This commit is contained in:
Elijah 2024-11-11 14:26:07 +00:00
parent e0d1a58496
commit db3f297c02
2 changed files with 4 additions and 3 deletions

View File

@ -106,7 +106,7 @@ def _init(
template = constants.Templates.DEFAULT template = constants.Templates.DEFAULT
# Initialize the app. # Initialize the app.
prerequisites.initialize_app(app_name, template) template = prerequisites.initialize_app(app_name, template)
# If a reflex.build generation hash is available, download the code and apply it to the main module. # If a reflex.build generation hash is available, download the code and apply it to the main module.
if generation_hash: if generation_hash:
@ -121,7 +121,7 @@ def _init(
prerequisites.initialize_requirements_txt() prerequisites.initialize_requirements_txt()
# Finish initializing the app. # Finish initializing the app.
console.success(f"Initialized {app_name}") console.success(f"Initialized {app_name} using the {template} template")
@cli.command() @cli.command()

View File

@ -1378,7 +1378,7 @@ def create_config_init_app_from_remote_template(app_name: str, template_url: str
shutil.rmtree(unzip_dir) shutil.rmtree(unzip_dir)
def initialize_app(app_name: str, template: str | None = None): def initialize_app(app_name: str, template: str | None = None) -> str:
"""Initialize the app either from a remote template or a blank app. If the config file exists, it is considered as reinit. """Initialize the app either from a remote template or a blank app. If the config file exists, it is considered as reinit.
Args: Args:
@ -1441,6 +1441,7 @@ def initialize_app(app_name: str, template: str | None = None):
) )
telemetry.send("init", template=template) telemetry.send("init", template=template)
return template
def initialize_main_module_index_from_generation(app_name: str, generation_hash: str): def initialize_main_module_index_from_generation(app_name: str, generation_hash: str):