Alter date_join field in User

This commit is contained in:
Skia 2015-12-15 09:27:50 +01:00
parent 787fd2f484
commit a6aac76d75
2 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='user',
name='date_joined',
field=models.DateTimeField(auto_now_add=True, verbose_name='date joined'),
),
]

View File

@ -60,7 +60,7 @@ class User(AbstractBaseUser, PermissionsMixin):
'Unselect this instead of deleting accounts.'
),
)
date_joined = models.DateTimeField(_('date joined'), default=timezone.now)
date_joined = models.DateTimeField(_('date joined'), auto_now_add=True)
owner_group = models.ForeignKey(Group, related_name="owned_user",
default=settings.AE_GROUPS['root']['id'])
edit_group = models.ManyToManyField(Group, related_name="editable_user", blank=True)