#20134 closed Cleanup/optimization (fixed)
UserManager documentation doesn't mention that it depends on date_joined
Reported by: | Ilya Semenov | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.5 |
Severity: | Normal | Keywords: | |
Cc: | pegler@… | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The documentation at https://docs.djangoproject.com/en/dev/topics/auth/customizing/ says:
If your User model defines username and email fields the same as Django’s default User, you can just install Django’s UserManager.
This is not true in the sense that these are not the only required fields for Django's UserManager to be a drop-in replacement. One has also to define MyUser.date_joined
, otherwise UserManager.create_user(..)
would fail to create a user.
The documentation should be updated to reflect that date_joined field is also required to use Django's UserManager.
Change History (4)
comment:1 by , 12 years ago
Cc: | added |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Agreed, the docs should be modified to indicate that
UserManager
requiresis_staff
,is_active
,is_superuser
,last_login
, anddate_joined
fields to be used.Best,
Matt