Move it even higher

This commit is contained in:
Lukáš Kucharczyk 2023-01-19 21:41:31 +01:00
parent 458ee11a71
commit 274520c57a
Signed by: lukas
SSH Key Fingerprint: SHA256:vMuSwvwAvcT6htVAioMP7rzzwMQNi3roESyhv+nAxeg
38 changed files with 18 additions and 23 deletions

View File

@ -2,49 +2,49 @@ all: css migrate
initialize: npm css migrate sethookdir loadplatforms initialize: npm css migrate sethookdir loadplatforms
HTMLFILES := $(shell find src/timetracker/games/templates -type f) HTMLFILES := $(shell find timetracker/games/templates -type f)
npm: npm:
npm install npm install
css: src/input.css css: input.css
npx tailwindcss -i ./src/input.css -o ./src/timetracker/games/static/base.css npx tailwindcss -i ./input.css -o ./timetracker/games/static/base.css
css-dev: css css-dev: css
npx tailwindcss -i ./src/input.css -o ./src/timetracker/games/static/base.css --watch npx tailwindcss -i ./input.css -o ./timetracker/games/static/base.css --watch
makemigrations: makemigrations:
poetry run python src/timetracker/manage.py makemigrations poetry run python timetracker/manage.py makemigrations
migrate: makemigrations migrate: makemigrations
poetry run python src/timetracker/manage.py migrate poetry run python timetracker/manage.py migrate
dev: migrate dev: migrate
poetry run python src/timetracker/manage.py runserver poetry run python timetracker/manage.py runserver
caddy: caddy:
caddy run --watch caddy run --watch
dev-prod: migrate collectstatic dev-prod: migrate collectstatic
cd src/timetracker/; PROD=1 poetry run python -m gunicorn --bind 0.0.0.0:8001 root.asgi:application -k uvicorn.workers.UvicornWorker cd timetracker/; PROD=1 poetry run python -m gunicorn --bind 0.0.0.0:8001 root.asgi:application -k uvicorn.workers.UvicornWorker
dumpgames: dumpgames:
poetry run python src/timetracker/manage.py dumpdata --format yaml games --output tracker_fixture.yaml poetry run python timetracker/manage.py dumpdata --format yaml games --output tracker_fixture.yaml
loadplatforms: loadplatforms:
poetry run python src/timetracker/manage.py loaddata platforms.yaml poetry run python timetracker/manage.py loaddata platforms.yaml
loadsample: loadsample:
poetry run python src/timetracker/manage.py loaddata sample.yaml poetry run python timetracker/manage.py loaddata sample.yaml
createsuperuser: createsuperuser:
poetry run python src/timetracker/manage.py createsuperuser poetry run python timetracker/manage.py createsuperuser
shell: shell:
poetry run python src/timetracker/manage.py shell poetry run python timetracker/manage.py shell
collectstatic: collectstatic:
poetry run python src/timetracker/manage.py collectstatic --clear --no-input poetry run python timetracker/manage.py collectstatic --clear --no-input
poetry.lock: pyproject.toml poetry.lock: pyproject.toml
poetry install poetry install
@ -56,6 +56,6 @@ date:
poetry run python -c 'import datetime; from zoneinfo import ZoneInfo; print(datetime.datetime.isoformat(datetime.datetime.now(ZoneInfo("Europe/Prague")), timespec="minutes", sep=" "))' poetry run python -c 'import datetime; from zoneinfo import ZoneInfo; print(datetime.datetime.isoformat(datetime.datetime.now(ZoneInfo("Europe/Prague")), timespec="minutes", sep=" "))'
cleanstatic: cleanstatic:
rm -r src/timetracker/static/* rm -r timetracker/static/*
clean: cleanstatic clean: cleanstatic

View File

@ -5,7 +5,7 @@ description = "A simple time tracker."
authors = ["Lukáš Kucharczyk <lukas@kucharczyk.xyz>"] authors = ["Lukáš Kucharczyk <lukas@kucharczyk.xyz>"]
license = "GPL" license = "GPL"
readme = "README.md" readme = "README.md"
packages = [{include = "timetracker", from = "src"}] packages = [{include = "timetracker"}]
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = "^3.10" python = "^3.10"
@ -30,10 +30,5 @@ isort = "^5.11.4"
requires = ["poetry-core"] requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api" build-backend = "poetry.core.masonry.api"
[tool.pytest.ini_options]
pythonpath = [
"src"
]
[tool.poetry.scripts] [tool.poetry.scripts]
timetracker-import = "timetracker.common.util.import_data:import_from_file" timetracker-import = "timetracker.common.import_data:import_from_file"

View File

@ -14,7 +14,7 @@ import os
from pathlib import Path from pathlib import Path
# Build paths inside the project like this: BASE_DIR / 'subdir'. # Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent BASE_DIR = Path(__file__).resolve()
# Quick-start development settings - unsuitable for production # Quick-start development settings - unsuitable for production