diff --git a/.envrc.dist b/.envrc.dist index 97e2ca3..88249b3 100644 --- a/.envrc.dist +++ b/.envrc.dist @@ -1,3 +1,4 @@ export DEBUG=false export SECRET_KEY=changeme export ALLOWED_HOSTS=localhost,127.0.0.1 +export DATABASE_URL=sqlite:////db/db.sqlite3 diff --git a/docker-compose.yaml b/docker-compose.yaml index ed812a2..d5f7fd7 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -4,9 +4,7 @@ services: shortener: image: rg.fr-par.scw.cloud/crocmagnon/shortener build: . - env_file: shortener.env - environment: - DATABASE_URL: sqlite:////db/db.sqlite3 + env_file: envs/docker.env ports: - 8000:8000 volumes: diff --git a/envs/docker.env b/envs/docker.env new file mode 100644 index 0000000..c611512 --- /dev/null +++ b/envs/docker.env @@ -0,0 +1,2 @@ +DEBUG=true +DATABASE_URL=sqlite:////db/db.sqlite3 diff --git a/envs/local.env b/envs/local.env new file mode 100644 index 0000000..99d137a --- /dev/null +++ b/envs/local.env @@ -0,0 +1 @@ +DEBUG=true diff --git a/src/redirect/tests/test_views.py b/src/redirect/tests/test_views.py index 11ff9b4..09c5b5d 100644 --- a/src/redirect/tests/test_views.py +++ b/src/redirect/tests/test_views.py @@ -1,6 +1,5 @@ from django.test import TestCase from django.urls import reverse -from model_bakery import baker from redirect.models import Redirect