Skip to content

Commit 698616b

Browse files
author
Janek Mangold
committed
feat: update .env.example and README for cookiecutter integration, enhance SECRET_KEY generation
1 parent d35de5c commit 698616b

File tree

3 files changed

+19
-13
lines changed

3 files changed

+19
-13
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
POSTGRES_DB=
2-
POSTGRES_USER=
3-
POSTGRES_PASSWORD=
4-
POSTGRES_HOST=
5-
POSTGRES_PORT=
1+
POSTGRES_DB={{ cookiecutter.project_slug }}
2+
POSTGRES_USER={{ cookiecutter.project_slug }}
3+
POSTGRES_PASSWORD={{ cookiecutter.project_slug }}
4+
POSTGRES_HOST=localhost
5+
POSTGRES_PORT=5432
66
DJANGO_SECRET_KEY=

django/{{ cookiecutter.project_slug }}/README.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@
1414
## Get started after cookiecutter
1515

1616
1. Create a new remote git repository [here](https://singular-code.de/projects/new)
17-
1. Create the following CI/CD variables (under Settings > CI/CD > Variables > Project variables):
17+
1. Create the following CI/CD variables (under `Settings` > `CI/CD` > `Variables` > `Project variables` > `Add variable`):
1818
- `DJANGO_SECRET_KEY`
19+
- Type: `Variable (default)`
20+
- Environments: `All (default)`
1921
- Visibility: `Masked`
20-
- Protect variable: `yes`
21-
- Expand variable reference: `no`
22+
- Flags - Protect variable: `yes`
23+
- Flags - Expand variable reference: `no`
2224
- Key: `DJANGO_SECRET_KEY`
2325
- Value:
2426
```shell
@@ -33,8 +35,10 @@
3335
3. Create a venv and install dependencies:
3436

3537
```bash
36-
uv venv
37-
source .venv/bin/activate
38+
uv venv --allow-existing
39+
# Windows
40+
.venv\Scripts\activate
41+
# Linux: source .venv/bin/activate
3842
uv sync
3943
```
4044

@@ -62,8 +66,10 @@
6266
1. Create a virtual environment using uv:
6367

6468
```bash
65-
uv venv
66-
source .venv/bin/activate
69+
uv venv --allow-existing
70+
# Windows
71+
.venv\Scripts\activate
72+
# Linux: source .venv/bin/activate
6773
uv sync
6874
```
6975

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
# Security
4545

46-
SECRET_KEY = env.str("DJANGO_SECRET_KEY", "{{ random_ascii_string(50) }}")
46+
SECRET_KEY = env.str("DJANGO_SECRET_KEY", "django-insecure-{{ random_ascii_string(20) }}")
4747
X_FRAME_OPTIONS = "SAMEORIGIN"
4848
SILENCED_SYSTEM_CHECKS = ["security.W019"]
4949

0 commit comments

Comments
 (0)