From 81c7eb67305d8b4ee325e33ae2c6e32c3a373879 Mon Sep 17 00:00:00 2001 From: safouane-bazzi Date: Thu, 16 Apr 2026 22:01:32 +0200 Subject: [PATCH] fix: config postgres + create admin --- .gitignore | 2 +- config.py | 7 +++---- create_admin.py | 6 +++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 6d4329e..531ddc5 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,4 @@ __pycache__/ *.log # Docker -*.db \ No newline at end of file +*.dbvenv/ diff --git a/config.py b/config.py index bc68608..0720195 100644 --- a/config.py +++ b/config.py @@ -1,10 +1,9 @@ import os class Config: - # S'il trouve la variable Docker, il l'utilise. Sinon, il met "localhost" par défaut. DB_HOST = os.environ.get("DB_HOST", "localhost") - DB_PORT = os.environ.get("DB_PORT", "5432") + DB_PORT = os.environ.get("DB_PORT", "5433") DB_NAME = os.environ.get("DB_NAME", "ecocharge") - DB_USER = os.environ.get("DB_USER", "ecocharge_user") - DB_PASSWORD = os.environ.get("DB_PASSWORD", "ecocharge_password") + DB_USER = os.environ.get("DB_USER", "postgres") + DB_PASSWORD = os.environ.get("DB_PASSWORD", "Safouane2005#") SECRET_KEY = os.environ.get("SECRET_KEY", "cle_par_defaut") \ No newline at end of file diff --git a/create_admin.py b/create_admin.py index ea47a18..116612a 100644 --- a/create_admin.py +++ b/create_admin.py @@ -2,10 +2,10 @@ import psycopg2 from werkzeug.security import generate_password_hash DB_HOST = "localhost" -DB_PORT = "5432" +DB_PORT = "5433" DB_NAME = "ecocharge" -DB_USER = "ecocharge_user" -DB_PASSWORD = "ecocharge_password" +DB_USER = "postgres" +DB_PASSWORD = "Safouane2005#" USERNAME = "admin" PLAIN_PASSWORD = "admin123"