MCPcopy Create free account
hub / github.com/1Panel-dev/MaxKB / insert_default_data

Function insert_default_data

apps/users/migrations/0001_initial.py:13–19  ·  view source on GitHub ↗
(apps, schema_editor)

Source from the content-addressed store, hash-verified

11
12
13def insert_default_data(apps, schema_editor):
14 UserModel = apps.get_model('users', 'User')
15 UserModel.objects.create(id='f0dd8f71-e4ee-11ee-8c84-a8a1595801ab', email='', username='admin',
16 nick_name="系统管理员",
17 password=password_encrypt(default_password),
18 role=RoleConstants.ADMIN.name,
19 is_active=True)
20
21
22class Migration(migrations.Migration):

Callers

nothing calls this directly

Calls 2

password_encryptFunction · 0.90
get_modelMethod · 0.45

Tested by

no test coverage detected