♻️Refactor App/Project
- also fix ohmyapi.core.scaffolding.startapp
This commit is contained in:
parent
69bd447374
commit
557bda6045
2 changed files with 63 additions and 62 deletions
|
|
@ -55,7 +55,7 @@ def startapp(name: str, project: str):
|
|||
"""Create a new app inside a project: templates go into <project_dir>/<name>/"""
|
||||
target_dir = Path(project)
|
||||
os.makedirs(target_dir, exist_ok=True)
|
||||
render_template_dir("app", target_dir, {"project_name": project, "app_name": name}, subdir_name=name)
|
||||
render_template_dir("app", target_dir, {"project_name": target_dir.resolve().name, "app_name": name}, subdir_name=name)
|
||||
print(f"✅ App '{name}' created in project '{target_dir}' successfully.")
|
||||
print(f"🔧 Remember to add '{name}' to your INSTALLED_APPS!")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue