Skip to content

Commit 4cd2bc3

Browse files
testing django-environ
1 parent 867afe9 commit 4cd2bc3

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/workflows/testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ jobs:
1212
pip install django==5.0.2
1313
pip install django-extensions
1414
pip install ruff
15+
pip django-environ
1516
- name: Run linting tools
1617
run: |
1718
cd app/
1819
ruff format .
1920
- name: Run Tests
2021
run: |
21-
cp .env.testing .env
2222
cp .env.testing app/.env
2323
cd app/
2424
ls -al

app/app/settings.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,14 @@
1313
import os
1414
from pathlib import Path
1515

16+
import environ
17+
1618
# Build paths inside the project like this: BASE_DIR / 'subdir'.
1719
BASE_DIR = Path(__file__).resolve().parent.parent
1820

21+
# Take environment variables from .env file
22+
environ.Env.read_env(os.path.join(BASE_DIR, ".env"))
23+
1924
# Quick-start development settings - unsuitable for production
2025
# See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/
2126

0 commit comments

Comments
 (0)