1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #25966 -- Made get_user_model() work at import time.

This makes it equivalent to: `from django.contrib.auth.models import User`.

Thanks Aymeric Augustin for the initial patch and Tim Graham for the
review.
This commit is contained in:
Aymeric Augustin
2016-09-30 22:06:02 +02:00
committed by Markus Holtermann
parent eb42d8d5d9
commit cb7bbf97a7
10 changed files with 63 additions and 20 deletions

View File

@@ -125,6 +125,9 @@ Minor features
Set :attr:`CustomUser.EMAIL_FIELD
<django.contrib.auth.models.CustomUser.EMAIL_FIELD>` to the name of the field.
* :func:`~django.contrib.auth.get_user_model` can now be called at import time,
even in modules that define models.
:mod:`django.contrib.contenttypes`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~