Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

Commit

Permalink
Merge branch 'fix/special-char-pwd' into 'main'
Browse files Browse the repository at this point in the history
🐛 fix for special char

See merge request lbb/lbb!654
  • Loading branch information
Sylvain Touret committed Nov 10, 2022
2 parents e627a29 + d4ea23c commit 72ee4ba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions labonneboite/common/database.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# http://flask.pocoo.org/docs/0.12/patterns/sqlalchemy/#declarative
# http://docs.sqlalchemy.org/en/rel_1_1/
import os
import urllib.parse
from typing import Optional, Dict, Union, TYPE_CHECKING

from sqlalchemy import create_engine
Expand All @@ -14,13 +15,13 @@

# Engine
# -----------------------------------------------------------------------------

# fix for special character in passwords https://docs.sqlalchemy.org/en/14/core/engines.html#database-urls
DATABASE: Dict[str, Union[str, int, None]] = {
"HOST": settings.DB_HOST,
"PORT": settings.DB_PORT,
"NAME": settings.DB_NAME,
"USER": settings.DB_USER,
"PASSWORD": settings.DB_PASSWORD,
"PASSWORD": urllib.parse.quote_plus(settings.DB_PASSWORD),
}


Expand Down

0 comments on commit 72ee4ba

Please sign in to comment.