From f71ebe7a089fee3fee293495fad4fbaf9e910e11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Thu, 19 Jan 2023 21:57:14 +0100 Subject: [PATCH] Fix more errors --- .gitignore | 2 +- entrypoint.sh | 3 +-- games/templatetags/version.py | 4 +--- timetracker/settings.py | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 5e290c8..4ddc414 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,4 @@ __pycache__ node_modules package-lock.json db.sqlite3 -src/timetracker/static \ No newline at end of file +static \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh index 9613b6a..b75c21a 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -9,5 +9,4 @@ poetry run python src/timetracker/manage.py collectstatic --clear --no-input echo "Starting server" caddy start -cd src/timetracker || exit -poetry run python -m gunicorn --bind 0.0.0.0:8001 root.asgi:application -k uvicorn.workers.UvicornWorker --access-logfile - --error-logfile - +poetry run python -m gunicorn --bind 0.0.0.0:8001 timetracker.asgi:application -k uvicorn.workers.UvicornWorker --access-logfile - --error-logfile - diff --git a/games/templatetags/version.py b/games/templatetags/version.py index 0249a74..95147cd 100644 --- a/games/templatetags/version.py +++ b/games/templatetags/version.py @@ -13,9 +13,7 @@ def version_date(): "%d-%b-%Y %H:%m", time.gmtime( os.path.getmtime( - os.path.abspath( - os.path.join(settings.BASE_DIR, "..", "..", "pyproject.toml") - ) + os.path.abspath(os.path.join(settings.BASE_DIR, "pyproject.toml")) ) ), ) diff --git a/timetracker/settings.py b/timetracker/settings.py index 90254ed..55ee615 100644 --- a/timetracker/settings.py +++ b/timetracker/settings.py @@ -14,7 +14,7 @@ import os from pathlib import Path # Build paths inside the project like this: BASE_DIR / 'subdir'. -BASE_DIR = Path(__file__).resolve() +BASE_DIR = Path(__file__).resolve().parent.parent # Quick-start development settings - unsuitable for production