From 936928e854d5f95aa9b53a5b59a04acb130b638d Mon Sep 17 00:00:00 2001 From: ahhui Date: Mon, 31 Jul 2023 14:45:09 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=20=E5=BE=AE=E8=B0=83=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E7=A0=81=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/application/settings.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/backend/application/settings.py b/backend/application/settings.py index f98615b..17453c8 100644 --- a/backend/application/settings.py +++ b/backend/application/settings.py @@ -13,6 +13,9 @@ https://docs.djangoproject.com/en/4.1/ref/settings/ import os import sys from pathlib import Path +from datetime import timedelta + +from conf.env import * # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent @@ -21,8 +24,6 @@ BASE_DIR = Path(__file__).resolve().parent.parent # ******************** 动态配置 ******************** # # ================================================= # -from conf.env import * - # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/ @@ -303,8 +304,6 @@ AUTHENTICATION_BACKENDS = ["dvadmin.utils.backends.CustomBackend"] # ================================================= # # ****************** simplejwt配置 ***************** # # ================================================= # -from datetime import timedelta - SIMPLE_JWT = { # token有效时长 "ACCESS_TOKEN_LIFETIME": timedelta(minutes=120), @@ -343,11 +342,11 @@ SWAGGER_SETTINGS = { # ================================================= # # **************** 验证码配置 ******************* # # ================================================= # -CAPTCHA_IMAGE_SIZE = (160, 60) # 设置 captcha 图片大小 +CAPTCHA_IMAGE_SIZE = (160, 46) # 设置 captcha 图片大小 CAPTCHA_LENGTH = 4 # 字符个数 CAPTCHA_TIMEOUT = 1 # 超时(minutes) CAPTCHA_OUTPUT_FORMAT = "%(image)s %(text_field)s %(hidden_field)s " -CAPTCHA_FONT_SIZE = 40 # 字体大小 +CAPTCHA_FONT_SIZE = 36 # 字体大小 CAPTCHA_FOREGROUND_COLOR = "#64DAAA" # 前景色 CAPTCHA_BACKGROUND_COLOR = "#F5F7F4" # 背景色 CAPTCHA_NOISE_FUNCTIONS = (