always use get_model in migrations
This commit is contained in:
parent
7d1786f143
commit
a59509a432
5 changed files with 3 additions and 22 deletions
|
@ -1,8 +1,6 @@
|
|||
from django.conf import settings
|
||||
from django.db import migrations
|
||||
|
||||
from authentication.models import ExtendedUser
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
|
@ -11,6 +9,7 @@ class Migration(migrations.Migration):
|
|||
]
|
||||
|
||||
def create_legacy_user(apps, schema_editor):
|
||||
ExtendedUser = apps.get_model('authentication', 'ExtendedUser')
|
||||
ExtendedUser.objects.create_user(settings.LEGACY_USER_NAME, 'mail@' + settings.MAIL_DOMAIN,
|
||||
settings.LEGACY_USER_PASSWORD)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue