diff options
| author | Tim Graham <timograham@gmail.com> | 2015-04-22 08:47:17 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-04-22 08:48:12 -0400 |
| commit | 0778f4dd8238279c4d16df6e8442317a42d04e00 (patch) | |
| tree | badaebc87a0c5b77081264a2cc44dd93529b0a03 /docs | |
| parent | 99bf9085a3c3bc54152b49e1e2ebec077daf54cf (diff) | |
[1.8.x] Clarified "AbstractUser.last_login allows null values" in 1.8 release notes.
Backport of 27b92228a969941d8fc0d04a894f436c0e9120c7 from master
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/releases/1.8.txt | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/docs/releases/1.8.txt b/docs/releases/1.8.txt index e41730e85f..1c970c5322 100644 --- a/docs/releases/1.8.txt +++ b/docs/releases/1.8.txt @@ -852,10 +852,14 @@ creating a test user). The exact privileges required now are detailed in The :attr:`AbstractUser.last_login <django.contrib.auth.models.User.last_login>` field now allows null values. Previously, it defaulted to the time when the user -was created which was misleading if the user never logged in. Please run the -database migration. If your custom user inherits from ``AbstractUser`` and you -wish to set ``last_login`` to ``NULL`` for users who haven't logged in, you can -run this query:: +was created which was misleading if the user never logged in. If you are using +the default user (:class:`django.contrib.auth.models.User`), run the database +migration included in ``contrib.auth``. + +If you are using a custom user model that inherits from ``AbstractUser``, +you'll need to run :djadmin:`makemigrations` and generate a migration for your +app that contains that model. Also, if wish to set ``last_login`` to ``NULL`` +for users who haven't logged in, you can run this query:: from django.db import models from django.contrib.auth import get_user_model |
