fix(djinit/utils): inject project_name into manage.py template rendering

Bug Fixes
- Add `project_name` to the template context when creating `manage.py` to prevent missing‑variable errors.
This commit is contained in:
sankalp committed 2026-01-30 23:29:31 +05:45
1 parent 665cd62f5a
commit 37e2ecff49
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -104,8 +104,8 @@ class FileManager:
files = [
("urls.py", "config/urls/with_api.j2", urls_context),
("wsgi.py", "config/wsgi.j2", {}),
("asgi.py", "config/asgi.j2", {}),
("wsgi.py", "config/wsgi.j2", {"project_name": prefix}),
("asgi.py", "config/asgi.j2", {"project_name": prefix}),
]
for filename, template, context in files:
+1 -1
View File
@@ -24,7 +24,7 @@ class DjangoHelper:
os.makedirs(directory, exist_ok=True)
manage_py_path = os.path.join(directory, "manage.py")
create_file_from_template(manage_py_path, "project/manage_py.j2", {}, "Created manage.py")
create_file_from_template(manage_py_path, "project/manage_py.j2", {"project_name": project_name}, "Created manage.py")
os.chmod(manage_py_path, 0o755)
if unified: