File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 6
6
7
7
## 开发说明
8
8
9
- 1 . 修改` build.sh ` 和` docker-compose.yml ` 中镜像版本,执行` build.sh ` 构建镜像
9
+ 1 . 修改` build.sh ` 和` docker-compose.yml ` 中镜像版本,执行` sh build.sh` 构建镜像
10
10
2 . 执行` docker-compose up -d ` 启动容器
11
11
3 . 执行` docker exec -it flask-api-demo bash ` 进入容器
12
12
4 . 执行` supervisorctl stop app ` 停止服务,并执行` flask run ` 或` python wsgi.py ` 进入开发者模式
Original file line number Diff line number Diff line change 1
1
# -*- coding: utf-8 -*-
2
2
# @Author : llc
3
3
# @Time : 2020/5/4 15:57
4
+ import json
4
5
import os
5
6
from datetime import timedelta
6
7
30
31
SQLALCHEMY_TRACK_MODIFICATIONS = False
31
32
# SQLALCHEMY_DATABASE_URI = SQLITE_DB_URI
32
33
SQLALCHEMY_DATABASE_URI = DB_URI
34
+ SQLALCHEMY_ENGINE_OPTIONS = {
35
+ "json_serializer" : lambda obj : json .dumps (obj , ensure_ascii = False )
36
+ }
33
37
# -------------------数据库配置-------------------
34
38
35
39
You can’t perform that action at this time.
0 commit comments