Skip to content

Commit 9f51e74

Browse files
author
Janek Mangold
committed
chore: Move .env.local read to base.py, Update README
1 parent 1e60b2a commit 9f51e74

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,21 @@
66

77
## Django template
88

9-
```shell
10-
# cd into the top-level directory where you want to create the project
11-
cd /path/to/your/top-level-directory
12-
cookiecutter https://github.com/singularit-de/cc-python.git --directory django
13-
```
9+
1. Go into the top-level directory where you want to create the project directory:
10+
11+
```
12+
cd /path/to/your/top-level-directory
13+
```
14+
15+
2. Run the following command to create a new Django project using the newest template version:
16+
```shell
17+
cookiecutter https://github.com/singularit-de/cc-python.git --directory django
18+
```
19+
20+
1. If you want to use a specific version/branch you can use the `--checkout <tag/branch>` option:
21+
```shell
22+
cookiecutter https://github.com/singularit-de/cc-python.git --directory django --checkout v1.1.0
23+
```
1424

1525
## Why we are using templates
1626

django/{{ cookiecutter.project_slug }}/.gitlab/ci/deploy.gitlab-ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ include:
44
http: app
55
auth: "*>public>*"
66
compose-file: .gitlab/docker-compose.staging.yml
7+
auto-stop-in: 6 months

django/{{ cookiecutter.project_slug }}/{{ cookiecutter.project_slug }}/settings/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
env = environ.Env()
2121
env.read_env(BASE_DIR / ".env")
22+
env.read_env(BASE_DIR / ".env.local", overwrite=True)
2223

2324

2425
TESTING = "test" in sys.argv

django/{{ cookiecutter.project_slug }}/{{ cookiecutter.project_slug }}/settings/local.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
from .base import * # noqa: F403
2-
3-
env = environ.Env()
4-
env.read_env(BASE_DIR / ".env.local")
1+
from .base import *
52

63
FRONTEND_URL = "http://localhost:5173"
74

0 commit comments

Comments
 (0)