Fix charset

This commit is contained in:
Michel Roux 2019-12-15 12:16:12 +01:00
parent 1f12253715
commit d62b98a95e

View File

@ -27,7 +27,7 @@ APP_PORT = environ.get('FLASK_PORT', 5000)
app = Flask(__name__) app = Flask(__name__)
app.secret_key = urandom(24).hex() app.secret_key = urandom(24).hex()
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://%s:%s@%s/%s' % (db_user, db_password, db_host, db_name) app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://%s:%s@%s/%s?charset=utf8mb4' % (db_user, db_password, db_host, db_name)
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = True app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = True
app.config['SQLALCHEMY_ECHO'] = IS_DEBUG app.config['SQLALCHEMY_ECHO'] = IS_DEBUG
auth = HTTPBasicAuth() auth = HTTPBasicAuth()