fix: 修改 EncryptMixin get_prep_value 和 默认关闭 XPACK

This commit is contained in:
Jiangjie.Bai
2022-08-09 10:42:35 +08:00
parent a7c82f94cc
commit 05e2f8aaf6
2 changed files with 3 additions and 2 deletions

View File

@@ -143,6 +143,7 @@ class EncryptMixin:
value = sp.get_prep_value(value)
value = force_text(value)
# 替换新的加密方式
return crypto.encrypt(value)
class EncryptTextField(EncryptMixin, models.TextField):