mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-25 15:45:23 +00:00
24 lines
559 B
Python
24 lines
559 B
Python
# -*- coding: utf-8 -*-
|
|
from __future__ import unicode_literals
|
|
|
|
from django.db import migrations
|
|
|
|
|
|
def add_useradmin(apps, schema_editor):
|
|
from django.utils import timezone
|
|
from django.contrib.auth.models import User
|
|
|
|
User.objects.create_superuser('admin', None, 'admin',
|
|
last_login=timezone.now()
|
|
)
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('accounts', '0001_initial'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.RunPython(add_useradmin),
|
|
]
|