use custom user and permission model
This commit is contained in:
parent
258065eec3
commit
0f911589ca
8 changed files with 252 additions and 0 deletions
19
core/authentication/migrations/0004_legacy_user.py
Normal file
19
core/authentication/migrations/0004_legacy_user.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
from django.conf import settings
|
||||
from django.db import migrations
|
||||
|
||||
from authentication.models import ExtendedUser
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
('authentication', '0003_groups'),
|
||||
]
|
||||
|
||||
def create_legacy_user(apps, schema_editor):
|
||||
ExtendedUser.objects.create_user(settings.LEGACY_USER_NAME, 'mail@' + settings.MAIL_DOMAIN,
|
||||
settings.LEGACY_USER_PASSWORD)
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(create_legacy_user)
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue