Skip to content

Commit

Permalink
Revert user.last_login to Django 1.7
Browse files Browse the repository at this point in the history
This reverts commit a2479f4
  • Loading branch information
thebarbershop committed May 26, 2020
1 parent 7325393 commit 2e011ae
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 23 deletions.
2 changes: 1 addition & 1 deletion django/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.utils.version import get_version
VERSION = (1, 8, 20, 'final', 0)
VERSION = (1, 8, 22, 'final', 0)

__version__ = get_version(VERSION)

Expand Down
19 changes: 0 additions & 19 deletions django/contrib/auth/migrations/0005_alter_user_last_login_null.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class Migration(migrations.Migration):

dependencies = [
('auth', '0005_alter_user_last_login_null'),
('auth', '0004_alter_user_username_opts'),
('contenttypes', '0002_remove_content_type_name'),
]

Expand Down
4 changes: 2 additions & 2 deletions django/contrib/auth/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def _create_user(self, username, email, password,
email = self.normalize_email(email)
user = self.model(username=username, email=email,
is_staff=is_staff, is_active=True,
is_superuser=is_superuser,
is_superuser=is_superuser, last_login=now,
date_joined=now, **extra_fields)
user.set_password(password)
user.save(using=self._db)
Expand All @@ -194,7 +194,7 @@ def create_superuser(self, username, email, password, **extra_fields):
@python_2_unicode_compatible
class AbstractBaseUser(models.Model):
password = models.CharField(_('password'), max_length=128)
last_login = models.DateTimeField(_('last login'), blank=True, null=True)
last_login = models.DateTimeField(_('last login'), default=timezone.now)

is_active = True

Expand Down

0 comments on commit 2e011ae

Please sign in to comment.