def profile_forward(apps, schema_editor):
User = apps.get_model(settings.AUTH_USER_MODEL)
Profile = apps.get_model("accounts", "Profile")
db_alias = schema_editor.connection.alias
for user in User.objects.using(db_alias).all():
Profile.objects.using(db_alias).get_or_create(user=user)
评论列表
文章目录