fix: config postgres + create admin
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -16,4 +16,4 @@ __pycache__/
|
||||
*.log
|
||||
|
||||
# Docker
|
||||
*.db
|
||||
*.dbvenv/
|
||||
|
||||
@@ -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")
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user