From 3de29922383b4a98717666243a1c4b322d30d284 Mon Sep 17 00:00:00 2001 From: jiangweidong Date: Thu, 9 Mar 2023 11:15:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9C=89=E5=8F=AF=E8=83=BD=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E6=98=8E=E6=96=87=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/common/local.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/common/local.py b/apps/common/local.py index 19b00537e..41b0cffe3 100644 --- a/apps/common/local.py +++ b/apps/common/local.py @@ -1,7 +1,10 @@ from werkzeug.local import Local +from django.utils import translation + + thread_local = Local() -encrypted_field_set = {'password'} +encrypted_field_set = {'password', 'secret'} def _find(attr): @@ -10,4 +13,5 @@ def _find(attr): def add_encrypted_field_set(label): if label: - encrypted_field_set.add(str(label)) + with translation.override('en'): + encrypted_field_set.add(str(label))