mirror of
https://gitlab.com/SIGBUS/nyaa.git
synced 2024-10-31 23:35:55 +00:00
utf8mb4 for database connection
This commit is contained in:
parent
c6d4803e90
commit
76812b0ef0
|
@ -11,7 +11,7 @@ ENABLE_SHOW_STATS = False
|
|||
|
||||
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
|
||||
if USE_MYSQL:
|
||||
SQLALCHEMY_DATABASE_URI = ('mysql://test:test123@localhost/nyaav2')
|
||||
SQLALCHEMY_DATABASE_URI = ('mysql://test:test123@localhost/nyaav2?charset=utf8mb4')
|
||||
else:
|
||||
SQLALCHEMY_DATABASE_URI = (
|
||||
'sqlite:///' + os.path.join(BASE_DIR, 'test.db') + '?check_same_thread=False')
|
||||
|
|
|
@ -12,6 +12,7 @@ app.config.from_object('config')
|
|||
|
||||
# Database
|
||||
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
|
||||
app.config['MYSQL_DATABASE_CHARSET'] = 'utf8mb4'
|
||||
|
||||
# Don't refresh cookie each request
|
||||
app.config['SESSION_REFRESH_EACH_REQUEST'] = False
|
||||
|
|
Loading…
Reference in a new issue