Django 1.7 data migration for custom user model
问题 I have created a custom user model for my project. I have written a data migration file to copy contents of auth.User to my new custom user table. It doesn't seem to work properly. It is throwing below error, from django.db import migrations, transaction @transaction.atomic def copy_old_users(apps, schema_editor): User = apps.get_model("auth", "User") CustomUser = apps.get_model("custom_auth", "User") fields = ['id', 'username', 'email', 'first_name', 'last_name', 'is_staff', 'is_active',