summaryrefslogtreecommitdiff
path: root/django/contrib/auth/models.py
AgeCommit message (Collapse)Author
2026-04-07Fixed #37021 -- Added Permission.user_perm_str property.mariatta
For use in checking user permissions via has_perm(). Co-authored-by: 사재혁 <jaehyuck.sa.dev@gmail.com>
2025-07-23Refs #36500 -- Shortened some long docstrings and comments.Mike Edmunds
Manually reformatted some long docstrings and comments that would be damaged by the to-be-applied autofixer script, in cases where editorial judgment seemed necessary for style or wording changes.
2025-04-23Simplified UserManager.with_perm() by using get_backends().Bona Fide IT GmbH
2025-03-31Refs #28909 -- Simplified code using unpacking generalizations.Aarni Koskela
2024-11-01Fixed #35837 -- Added missing alters_data=True to QuerySet and UserManager ↵Sarah Boyce
methods. Thank you to Jason Chambers for the report and to Mariusz Felisiak for the review.
2024-10-07Fixed #35303 -- Implemented async auth backends and utils.Jon Janzen
2023-11-24Fixed #34983 -- Deprecated django.utils.itercompat.is_iterable().Nick Pope
2022-02-07Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-11-11Fixed #33269 -- Made AnonymousUser/PermissionsMixin.has_perms() raise ↵Lie Ryan
ValueError on string or non-iterable perm_list.
2020-07-06Refs #26445 -- Allowed using UserManager.create_user()/create_superuser() in ↵Hasan Ramezani
migrations. Used app config to lookup user model in _create_user(). Thanks Markus Holtermann for the review and initial patch. Thanks Simon Charette for the implementation idea.
2020-03-18Fixed #31371 -- Increased User.first_name max_length to 150 characters.Ryan Petrello
2019-11-05Fixed #30947 -- Changed tuples to lists in model Meta options in ↵Jon Dufresne
django.contrib modules. The Django "Model Meta options" docs provide examples and generally point the reader to use lists for the unique_together and ordering options. Follow our own advice for contrib models. More generally, lists should be used for homogeneous sequences of arbitrary lengths of which both unique_together and ordering are.
2019-08-29Fixed #18763 -- Added ModelBackend/UserManager.with_perm() methods.Berker Peksag
Co-authored-by: Nick Pope <nick.pope@flightdataservices.com>
2019-08-29Fixed #30066 -- Enabled super user creation without email and passworddaniel a rios
2019-06-05Refs #30226 -- Added User.get_user_permissions() method.Tobias Bengfort
Added to mirror the existing User.get_group_permissions().
2019-02-07Fixed #16027 -- Added app_label to ContentType.__str__().Gregory N. Schmit
2018-12-27Followed style guide for model attribute ordering.Matt Wiens
2018-11-14Fixed #29939 -- Increased Group.name max_length to 150 characters.Timothy Allen
2018-09-26Fixed #29782 -- Added better error message when filtering queryset with ↵Ramon Saraiva
AnonymousUser.
2018-09-26Fixed #29683 -- Added view permission to docs.Stephen James
2018-08-01Fixed typos in comments and docs.luz.paz
2018-03-04Corrected User model docstring about required fields.ovalseven8
Follow up to 841a87785a78cc37362a66856025bae2f7ba633c.
2017-12-26Fixed #28930 -- Simplified code with any() and all().Дилян Палаузов
2017-09-07Removed unneeded __init__() methods.Sergey Fedoseev
2017-05-29Fixed #26823 -- Prevented update_last_login signal receiver from crashing if ↵Linus Lewandowski
User model doesn't have last_login field.
2017-02-07Converted usage of ugettext* functions to their gettext* aliasesClaude Paroz
Thanks Tim Graham for the review.
2017-02-04Refs #27656 -- Updated django.contrib docstring verb style according to PEP 257.Anton Samarchyan
2017-01-28Fixed #26993 -- Increased User.last_name max_length to 150 characters.Thom Wiggers
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-19Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette
2017-01-18Refs #23919 -- Removed obsolete __ne__() methods.Aymeric Augustin
__ne__() defaults to the opposite of __eq__() on Python 3 when it doesn't return NotImplemented.
2017-01-18Refs #23919 -- Removed six.<various>_types usageClaude Paroz
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18Refs #23919 -- Removed six.PY2/PY3 usageClaude Paroz
Thanks Tim Graham for the review.
2017-01-18Refs #23919 -- Removed python_2_unicode_compatible decorator usageClaude Paroz
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2017-01-17Refs #25847 -- Removed support for User.is_(anonymous|authenticated) as methods.Tim Graham
Per deprecation timeline.
2016-11-28Quoted group name in django/contrib/auth/models.py docstring.Nik Nyby
2016-11-14Fixed E305 flake8 warnings.Ramin Farajpour Cami
2016-09-27Fixed #20705 -- Allowed using PasswordResetForm with user models with an ↵levental
email field not named 'email'.
2016-08-25Replaced property() usage with decorator in several places.Berker Peksag
2016-08-13Used all() and a generator for PermissionsMixin.has_perms().Curtis Maloney
2016-06-24Fixed #26719 -- Normalized email in AbstractUser.clean().Bang Dao + Tam Huynh
2016-06-21Refs #21379, #26719 -- Moved username normalization to AbstractBaseUser.Tim Graham
Thanks Huynh Thanh Tam for the initial patch and Claude Paroz for review.
2016-05-16Refs #21379 -- Normalized unicode username inputsClaude Paroz
2016-05-16Fixed #21379 -- Created auth-specific username validatorsClaude Paroz
Thanks Tim Graham for the review.
2016-04-09Fixed #25847 -- Made User.is_(anonymous|authenticated) properties.Jeremy Lainé
2016-01-08Fixed #20846 -- Decreased User.username max_length to 150 characters.Collin Anderson
2015-10-29Fixed #20846 -- Increased User.username max_length to 254 characters.Tim Graham
Thanks Collin Anderson and Nick Sandford for work on the patch.
2015-07-27Fixed #21127 -- Started deprecation toward requiring on_delete for ↵Flavio Curella
ForeignKey/OneToOneField