1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-25 23:55:24 +00:00
webvirtcloud/accounts/migrations/0002_auto_20150325_0846.py

25 lines
559 B
Python
Raw Normal View History

2015-03-25 09:36:37 +00:00
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
2015-03-27 15:12:15 +00:00
from django.db import migrations
2015-03-25 09:36:37 +00:00
2015-03-27 15:12:15 +00:00
2015-04-02 11:24:28 +00:00
def add_useradmin(apps, schema_editor):
2015-05-07 14:00:11 +00:00
from django.utils import timezone
from django.contrib.auth.models import User
User.objects.create_superuser('admin', None, 'admin',
last_login=timezone.now()
)
2015-03-25 09:36:37 +00:00
2015-03-27 15:12:15 +00:00
2015-03-25 09:36:37 +00:00
class Migration(migrations.Migration):
dependencies = [
('accounts', '0001_initial'),
]
operations = [
2015-04-02 11:24:28 +00:00
migrations.RunPython(add_useradmin),
2015-03-27 15:12:15 +00:00
]