Skip to content

Commit 3e454ec

Browse files
committed
add src dir to system path
1 parent 673cc07 commit 3e454ec

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_app/settings.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@
1010
https://docs.djangoproject.com/en/3.2/ref/settings/
1111
"""
1212
import os
13+
import sys
1314
from pathlib import Path
1415

16+
1517
# Build paths inside the project like this: BASE_DIR / 'subdir'.
1618
BASE_DIR = Path(__file__).resolve().parent.parent
19+
SRC_DIR = BASE_DIR.parent / "src"
1720

1821
# Quick-start development settings - unsuitable for production
1922
# See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/
@@ -62,6 +65,7 @@
6265
},
6366
]
6467
ASGI_APPLICATION = "test_app.asgi.application"
68+
sys.path.append(str(SRC_DIR))
6569

6670
# Database
6771
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases
@@ -72,7 +76,6 @@
7276
}
7377
}
7478

75-
7679
# Password validation
7780
# https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators
7881
AUTH_PASSWORD_VALIDATORS = [

0 commit comments

Comments
 (0)