adding food logging, phase 3

This commit is contained in:
Joren de Graaf
2026-10-03 20:53:54 +02:00
parent fca2ef2acd
commit 03fcbcbafc
8 changed files with 413 additions and 4 deletions
+7
View File
@@ -130,6 +130,13 @@ VITE_DEV_SERVER = os.environ.get('VITE_DEV_SERVER', 'http://localhost:5173')
VITE_USE_DEV_SERVER = os.environ.get('VITE_USE_DEV_SERVER', str(DEBUG)).lower() in {'1', 'true', 'yes'}
VITE_MANIFEST_PATH = BASE_DIR / 'planner' / 'static' / 'planner' / 'dist' / '.vite' / 'manifest.json'
# Open Food Facts is queried only by explicit food search or product lookup.
OPENFOODFACTS_ENABLED = os.environ.get('OPENFOODFACTS_ENABLED', 'true').lower() in {'1', 'true', 'yes'}
OPENFOODFACTS_PRODUCT_URL = os.environ.get('OPENFOODFACTS_PRODUCT_URL', 'https://world.openfoodfacts.org/api/v2/product/{barcode}.json')
OPENFOODFACTS_SEARCH_URL = os.environ.get('OPENFOODFACTS_SEARCH_URL', 'https://world.openfoodfacts.org/cgi/search.pl')
OPENFOODFACTS_USER_AGENT = os.environ.get('OPENFOODFACTS_USER_AGENT', 'Tasknest/1.0 (https://tasksnest.jorendegraaf.eu)')
OPENFOODFACTS_TIMEOUT_SECONDS = float(os.environ.get('OPENFOODFACTS_TIMEOUT_SECONDS', '6'))
# Optional Gitea contribution grid on the task dashboard. Read only these
# values from the repository's ignored .env file; the process environment wins.
def _gitea_env(name, default=''):