Skip to content

Commit ebb475c

Browse files
committed
refactor: update default password configuration key and improve model field formatting
1 parent 1e20526 commit ebb475c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

apps/users/migrations/0001_initial.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
from common.utils.common import password_encrypt
88
from maxkb.const import CONFIG
99

10-
default_password = CONFIG.get('default_password', 'MaxKB@123..')
10+
default_password = CONFIG.get('DEFAULT_PASSWORD', 'MaxKB@123..')
11+
1112

1213
def insert_default_data(apps, schema_editor):
1314
UserModel = apps.get_model('users', 'User')
@@ -28,7 +29,9 @@ class Migration(migrations.Migration):
2829
migrations.CreateModel(
2930
name='User',
3031
fields=[
31-
('id', models.UUIDField(default=uuid_utils.compat.uuid7, editable=False, primary_key=True, serialize=False, verbose_name='主键id')),
32+
('id',
33+
models.UUIDField(default=uuid_utils.compat.uuid7, editable=False, primary_key=True, serialize=False,
34+
verbose_name='主键id')),
3235
('email', models.EmailField(blank=True, max_length=254, null=True, unique=True, verbose_name='邮箱')),
3336
('phone', models.CharField(default='', max_length=20, verbose_name='电话')),
3437
('nick_name', models.CharField(max_length=150, unique=True, verbose_name='昵称')),

0 commit comments

Comments
 (0)