Files
pablo 4b0d404116
CI / test (push) Successful in 2m13s
CI / build (push) Successful in 55s
feat: included 2FA and lots of feature from django-htmx-template
2026-09-16 13:20:44 +02:00

54 lines
1.7 KiB
Makefile

.DEFAULT_GOAL := help
.PHONY: help install run migrate makemigrations collectstatic superuser shell \
test coverage lint format messages compilemessages \
precommit-install precommit
help: ## Muestra esta ayuda
@grep -E '^[a-zA-Z0-9_-]+:.*## ' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}'
install: ## Instala dependencias (incluidas las de desarrollo)
uv sync --group dev
run: ## Arranca el servidor de desarrollo
uv run python manage.py runserver 0.0.0.0:8000
migrate: ## Aplica las migraciones pendientes
uv run python manage.py migrate
makemigrations: ## Genera migraciones a partir de cambios en los modelos
uv run python manage.py makemigrations
collectstatic: ## Recopila los archivos estáticos
uv run python manage.py collectstatic --noinput
superuser: ## Crea un superusuario (para /admin/)
uv run python manage.py createsuperuser
shell: ## Abre una shell de Django (django-extensions shell_plus si está instalado)
uv run python manage.py shell_plus
test: ## Ejecuta la suite de tests
uv run pytest
coverage: ## Ejecuta los tests con cobertura
uv run pytest --cov
lint: ## Comprueba estilo/errores con ruff (no modifica nada)
uv run ruff check .
format: ## Aplica el formateador de ruff (ver [tool.ruff.format] en pyproject.toml)
uv run ruff format .
messages: ## Regenera las cadenas traducibles (es/en)
uv run python manage.py makemessages -l es -l en
compilemessages: ## Compila las traducciones (.po -> .mo)
uv run python manage.py compilemessages
precommit-install: ## Instala el hook de pre-commit en este repo
uv run pre-commit install
precommit: ## Ejecuta todos los hooks de pre-commit sobre el repo entero
uv run pre-commit run --all-files