[Update] 修改初始

pull/1043/head
ibuler 2018-02-26 12:31:33 +08:00
parent 1f3b11a223
commit c68da5898a
1 changed files with 3 additions and 0 deletions

View File

@ -28,6 +28,9 @@ def add_default_admin(apps, schema_editor):
email="admin@mycomany.com", role="Admin",
password=make_password("admin"),
)
group_model = apps.get_model("users", "UserGroup")
default_group = group_model.objects.using(db_alias).get(name="Default")
admin.groups.add(default_group)
class Migration(migrations.Migration):