File tree Expand file tree Collapse file tree 2 files changed +2
-11
lines changed
Expand file tree Collapse file tree 2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change 22import json
33
44# Update the .env file with the answers from the .copier-answers.yml file
5- # without using Jinja2 templates in the .env file, this way the code works as is
6- # without needing Copier, but if Copier is used, the .env file will be updated
75root_path = Path (__file__ ).parent .parent
86answers_path = Path (__file__ ).parent / ".copier-answers.yml"
97answers = json .loads (answers_path .read_text ())
2523 lines .append (line )
2624env_example_path .write_text ("\n " .join (lines ))
2725
28- # Also create a .env file with the same content as the .env.example file
26+ # this creates a .env file with the same content as the .env.example file.
2927env_file_path = root_path / ".env"
3028env_file_path .write_text (env_example_path .read_text ())
Original file line number Diff line number Diff line change @@ -4,19 +4,12 @@ project_name:
44 default : python-template
55
66_exclude :
7- # Global
8- - .github
9- - .vscode
10- - .mypy_cache
117 # Python
128 - __pycache__
139 - .mypy_cache
1410 - .cache
15- - .docs
16- - .devcontainer
1711 - .venv
18- - .pyproject.toml
19- - README.md
12+ - uv.lock
2013
2114
2215_answers_file : .copier/.copier-answers.yml
You can’t perform that action at this time.
0 commit comments