{{{
A django.contrib.auth.models.User object representing the currently
logged-in user.
}}}
But apparently ([http://stackoverflow.com/questions/17355275]), it returns
the AUTH_USER_MODEL if it is defined.
I think this should be clarified in the documentation.
--
Ticket URL: <https://code.djangoproject.com/ticket/20673>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_docs: => 0
* needs_tests: => 0
* easy: 0 => 1
* stage: Unreviewed => Accepted
Comment:
Good catch, thanks.
It looks like the docstring for `contrib.auth.backends.ModelBackend` [1]
is incorrect too.
[1]
https://github.com/django/django/blob/master/django/contrib/auth/backends.py#L8
--
Ticket URL: <https://code.djangoproject.com/ticket/20673#comment:1>
* owner: nobody => susan
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/20673#comment:2>
Comment (by susan):
To be honest, I'm not entirely sure what the docstring needs to be in
"contrib.auth.backends.ModelBackend". Can someone point me in the right
direction?
--
Ticket URL: <https://code.djangoproject.com/ticket/20673#comment:3>
Comment (by susan):
Feel free to check this 1-line change:
https://github.com/onceuponatimeforever/django/commit/177f0400c46d27463316c962780ea4b351077aeb
--
Ticket URL: <https://code.djangoproject.com/ticket/20673#comment:4>
Comment (by timo):
Susan, the problem is that the docs say that a
`django.contrib.auth.models.User` object is returned, but with the
introduction of custom user models, that may no longer be true.
--
Ticket URL: <https://code.djangoproject.com/ticket/20673#comment:5>
Comment (by Chandrakant Gopalan):
Let me take a shot...
Instead of:
A ``django.contrib.auth.models.User`` object representing the
currently
logged-in user.
Say this:
An object representing the currently logged-in user. Will be the user
object in
:setting:`AUTH_USER_MODEL` setting if specified,
``django.contrib.auth.models.User`` otherwise.
--
Ticket URL: <https://code.djangoproject.com/ticket/20673#comment:6>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"f407f75aae242d1bd8d4ac7f19c5d4075353c65e"]:
{{{
#!CommitTicketReference repository=""
revision="f407f75aae242d1bd8d4ac7f19c5d4075353c65e"
Fixed #20673 -- Clarified that HttpRequest.user uses AUTH_USER_MODEL.
Thanks littlepig for the report.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/20673#comment:7>
Comment (by Tim Graham <timograham@…>):
In [changeset:"82a6a956d50edf1008b89b886090459d2e65ac1a"]:
{{{
#!CommitTicketReference repository=""
revision="82a6a956d50edf1008b89b886090459d2e65ac1a"
[1.5.x] Fixed #20673 -- Clarified that HttpRequest.user uses
AUTH_USER_MODEL.
Thanks littlepig for the report.
Backport of f407f75aae from master.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/20673#comment:8>
Comment (by Tim Graham <timograham@…>):
In [changeset:"23748c483b128773edb5f5e8ee509bf12732595c"]:
{{{
#!CommitTicketReference repository=""
revision="23748c483b128773edb5f5e8ee509bf12732595c"
[1.6.x] Fixed #20673 -- Clarified that HttpRequest.user uses
AUTH_USER_MODEL.
Thanks littlepig for the report.
Backport of f407f75aae from master.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/20673#comment:9>