File tree Expand file tree Collapse file tree 8 files changed +17
-13
lines changed Expand file tree Collapse file tree 8 files changed +17
-13
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ dmypy.json
111111
112112venv
113113.venv
114- static
115114.env
116115db.sqlite
116+ /static
117117/media
Original file line number Diff line number Diff line change 2525 uv run dotenv-linter src/app/.env.ci
2626
2727test :
28- @mkdir -p src/static
2928 uv run pytest --dead-fixtures
3029 uv run pytest --create-db --exitfirst --numprocesses ${SIMULTANEOUS_TEST_JOBS}
3130
Original file line number Diff line number Diff line change 11from pathlib import Path
22
33
4- BASE_DIR = Path (__file__ ).resolve ().parent .parent
4+ # Repository root directory
5+ BASE_DIR = Path (__file__ ).resolve ().parent .parent .parent .parent
6+
7+ SRC_DIR = BASE_DIR / "src"
58
69ROOT_URLCONF = "app.urls"
710
Original file line number Diff line number Diff line change 11import environ # type: ignore[import-untyped]
22
3- from app .conf .boilerplate import BASE_DIR
3+ from app .conf .boilerplate import SRC_DIR
44
55
66env = environ .Env (
77 DEBUG = (bool , False ),
88 CI = (bool , False ),
99)
1010
11- envpath = BASE_DIR / ".env"
11+ envpath = SRC_DIR / "app" / ".env"
1212
1313if envpath .exists ():
1414 env .read_env (envpath )
Original file line number Diff line number Diff line change 1- from pathlib import Path
2-
3- from app .conf .boilerplate import BASE_DIR
1+ from app .conf .boilerplate import SRC_DIR
42
53
64LANGUAGE_CODE = "ru"
75
8- LOCALE_PATHS = [Path (BASE_DIR ).parent / ".locale" ]
6+ LOCALE_PATHS = [
7+ SRC_DIR / ".locale" ,
8+ ]
99
1010USE_i18N = True
Original file line number Diff line number Diff line change 1+ from app .conf .boilerplate import BASE_DIR
12from app .conf .environ import env
23
34
45MEDIA_URL = "/media/"
5- MEDIA_ROOT = env ("MEDIA_ROOT" , cast = str , default = "media" )
6+ MEDIA_ROOT = env . path ("MEDIA_ROOT" , default = BASE_DIR / "media" )
Original file line number Diff line number Diff line change 1+ from app .conf .boilerplate import BASE_DIR
12from app .conf .environ import env
23
34
45# Static files (CSS, JavaScript, Images)
56# https://docs.djangoproject.com/en/3.0/howto/static-files/
67
78STATIC_URL = "/static/"
8- STATIC_ROOT = env ("STATIC_ROOT" , cast = str , default = "static" )
9+ STATIC_ROOT = env . path ("STATIC_ROOT" , default = BASE_DIR / "static" )
Original file line number Diff line number Diff line change @@ -7,14 +7,14 @@ class Command(BaseCommand):
77
88 def handle (self , ** options ):
99 if "directory" not in options or options ["directory" ] is None :
10- directory = settings .BASE_DIR . parent / options ["name" ]
10+ directory = settings .SRC_DIR / options ["name" ]
1111
1212 directory .mkdir (exist_ok = True )
1313
1414 options ["directory" ] = str (directory )
1515
1616 if "template" not in options or options ["template" ] is None :
17- template = settings .BASE_DIR . parent / ".django-app-template"
17+ template = settings .SRC_DIR / ".django-app-template"
1818
1919 options ["template" ] = str (template )
2020
You can’t perform that action at this time.
0 commit comments