feat: 添加FACE_PATH

This commit is contained in:
caoqianming 2023-09-11 10:42:54 +08:00
parent e71d5af84a
commit bc919c8970
2 changed files with 8 additions and 1 deletions

View File

@ -30,3 +30,4 @@ xlwt==1.3.0
openpyxl==3.1.0 openpyxl==3.1.0
cron-descriptor==1.2.35 cron-descriptor==1.2.35
pymysql==1.0.3 pymysql==1.0.3
deepface==0.0.79

View File

@ -201,6 +201,12 @@ STATIC_ROOT = os.path.join(BASE_DIR, 'dist/static')
MEDIA_URL = '/media/' MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media') MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
# 人脸库配置
# 如果地址不存在,则自动创建
FACE_PATH= os.path.join(BASE_DIR, 'media/face')
if not os.path.exists(FACE_PATH):
os.makedirs(FACE_PATH)
# 邮箱配置 # 邮箱配置
EMAIL_HOST = conf.EMAIL_HOST EMAIL_HOST = conf.EMAIL_HOST
@ -313,7 +319,7 @@ SWAGGER_SETTINGS = {
# 创建日志的路径 # 创建日志的路径
LOG_PATH = os.path.join(BASE_DIR, 'log') LOG_PATH = os.path.join(BASE_DIR, 'log')
# 如果地址不存在则自动创建log文件夹 # 如果地址不存在则自动创建log文件夹
if not os.path.exists(os.path.join(LOG_PATH)): if not os.path.exists(LOG_PATH):
os.makedirs(LOG_PATH) os.makedirs(LOG_PATH)
LOGGING = { LOGGING = {