From d1d6f3fe9c538978d54ce9c9310a6836374ad53b Mon Sep 17 00:00:00 2001 From: feng <1304903146@qq.com> Date: Thu, 17 Jul 2025 12:54:59 +0800 Subject: [PATCH] perf: string_punctuation remove > ^ --- apps/common/utils/random.py | 2 +- apps/ops/const.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/common/utils/random.py b/apps/common/utils/random.py index a245596f3..2f5b3848e 100644 --- a/apps/common/utils/random.py +++ b/apps/common/utils/random.py @@ -6,7 +6,7 @@ import socket import string import struct -string_punctuation = '!#$%&()*+,-.:;<=>?@[]^_~' +string_punctuation = '!#$%&()*+,-.:;<=?@[]_~' def random_datetime(date_start, date_end): diff --git a/apps/ops/const.py b/apps/ops/const.py index 387439d53..e07922f66 100644 --- a/apps/ops/const.py +++ b/apps/ops/const.py @@ -1,6 +1,8 @@ from django.db import models from django.utils.translation import gettext_lazy as _, pgettext_lazy +from common.utils import string_punctuation + class StrategyChoice(models.TextChoices): push = 'push', _('Push') @@ -21,7 +23,6 @@ class PasswordStrategy(models.TextChoices): random_all = 'random_all', _('All assets use different random password') -string_punctuation = '!#$%&()*+,-.:;<=?@[]_~' DEFAULT_PASSWORD_LENGTH = 30 DEFAULT_PASSWORD_RULES = { 'length': DEFAULT_PASSWORD_LENGTH,