No description
- Python 60.8%
- HTML 27.7%
- JavaScript 7.9%
- Dockerfile 2.2%
- CSS 1.4%
- Log `Member.save()` and thumbnail generation timing for performance monitoring. - Add `form-progress.js` to provide visual feedback (spinner and "Envoi…" label) on HTMX form submission. - Add CSS spinner styles to `base.html` for button feedback. |
||
|---|---|---|
| .github/workflows | ||
| config | ||
| members | ||
| static | ||
| templates | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| Dockerfile | ||
| manage.py | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
Trombinoscope scouts
Application web mobile-first pour les chefs : trombinoscope des membres d'un groupe scout. Photos, tison, patrouille, année d'entrée ; ajout, édition, archivage et suppression. Accès réservé (connexion).
Stack : Django 6 + HTMX, base SQLite (partagée sur un serveur), CSS Tailwind v4. Le code est en anglais, l'interface en français.
Démarrage (développement)
# 1. Dépendances (uv gère l'environnement)
uv sync
# 2. Configuration
cp .env.example .env # puis générer une SECRET_KEY :
uv run python -c "from django.core.management.utils import get_random_secret_key as k; print(k())"
# 3. Base de données + compte chef
uv run python manage.py migrate
uv run python manage.py createsuperuser
# 4. (Optionnel) données de démo
uv run python manage.py seed_demo
# 5. Lancer
uv run python manage.py runserver
App : http://127.0.0.1:8000/ · Admin Django : http://127.0.0.1:8000/admin/
CSS (Tailwind)
Le binaire Tailwind est dans bin/tailwindcss (non versionné). Recompiler après
avoir modifié des templates ou static/src/input.css :
./bin/tailwindcss -i static/src/input.css -o static/css/app.css --minify
# ou en watch pendant le dev :
./bin/tailwindcss -i static/src/input.css -o static/css/app.css --watch
Tests
uv run python manage.py test members
Gestion des membres
- Ajouter / modifier : bouton « + Ajouter » (modale HTMX) ou fiche détail. Sur mobile, le champ photo ouvre l'appareil photo. Une miniature carrée est générée automatiquement.
- Rechercher / filtrer : recherche live (nom, prénom, tison), filtre par patrouille, bascule « Archivés » — sans rechargement (HTMX).
- Archiver : bouton sur chaque carte (réversible). Préférer l'archivage à la suppression pour garder l'historique.
- Supprimer : depuis la fiche détail, avec confirmation (irréversible).
- Les patrouilles et les comptes chefs se gèrent dans l'admin Django.
Production (aperçu)
.env:DEBUG=False,SECRET_KEYfort,ALLOWED_HOSTS, éventuellementDATABASE_URL(Postgres) etCSRF_TRUSTED_ORIGINS.uv run python manage.py collectstatic(WhiteNoise sert les statiques).- Servir via
gunicorn config.wsgiderrière un reverse-proxy (nginx) qui sert aussi/media/(photos).