From 981eb65fac68d73e0e90e0625ba581e6f54c629f Mon Sep 17 00:00:00 2001 From: Retspen Date: Thu, 7 May 2015 17:00:11 +0300 Subject: [PATCH] Fixed default account --- accounts/migrations/0002_auto_20150325_0846.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/accounts/migrations/0002_auto_20150325_0846.py b/accounts/migrations/0002_auto_20150325_0846.py index c5ad87f..8780f97 100644 --- a/accounts/migrations/0002_auto_20150325_0846.py +++ b/accounts/migrations/0002_auto_20150325_0846.py @@ -5,10 +5,12 @@ from django.db import migrations def add_useradmin(apps, schema_editor): - # from django.contrib.auth.models import User - # Broken in Django 1.8 - # User.objects.create_superuser("admin", None, "admin") - pass + 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):