Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
f407f75a
Kaydet (Commit)
f407f75a
authored
Tem 04, 2013
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #20673 -- Clarified that HttpRequest.user uses AUTH_USER_MODEL.
Thanks littlepig for the report.
üst
428de2e3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
backends.py
django/contrib/auth/backends.py
+1
-1
request-response.txt
docs/ref/request-response.txt
+6
-5
No files found.
django/contrib/auth/backends.py
Dosyayı görüntüle @
f407f75a
...
@@ -5,7 +5,7 @@ from django.contrib.auth.models import Permission
...
@@ -5,7 +5,7 @@ from django.contrib.auth.models import Permission
class
ModelBackend
(
object
):
class
ModelBackend
(
object
):
"""
"""
Authenticates against
django.contrib.auth.models.User
.
Authenticates against
settings.AUTH_USER_MODEL
.
"""
"""
def
authenticate
(
self
,
username
=
None
,
password
=
None
,
**
kwargs
):
def
authenticate
(
self
,
username
=
None
,
password
=
None
,
**
kwargs
):
...
...
docs/ref/request-response.txt
Dosyayı görüntüle @
f407f75a
...
@@ -165,10 +165,11 @@ All attributes should be considered read-only, unless stated otherwise below.
...
@@ -165,10 +165,11 @@ All attributes should be considered read-only, unless stated otherwise below.
.. attribute:: HttpRequest.user
.. attribute:: HttpRequest.user
A
``django.contrib.auth.models.User`` object
representing the currently
A
n object of type :setting:`AUTH_USER_MODEL`
representing the currently
logged-in user. If the user isn't currently logged in, ``user`` will be set
logged-in user. If the user isn't currently logged in, ``user`` will be set
to an instance of ``django.contrib.auth.models.AnonymousUser``. You
to an instance of :class:`django.contrib.auth.models.AnonymousUser`. You
can tell them apart with ``is_authenticated()``, like so::
can tell them apart with
:meth:`~django.contrib.auth.models.User.is_authenticated`, like so::
if request.user.is_authenticated():
if request.user.is_authenticated():
# Do something for logged-in users.
# Do something for logged-in users.
...
@@ -176,8 +177,8 @@ All attributes should be considered read-only, unless stated otherwise below.
...
@@ -176,8 +177,8 @@ All attributes should be considered read-only, unless stated otherwise below.
# Do something for anonymous users.
# Do something for anonymous users.
``user`` is only available if your Django installation has the
``user`` is only available if your Django installation has the
``AuthenticationMiddleware`` activated. For more, see
:class:`~django.contrib.auth.middleware.AuthenticationMiddleware`
:doc:`/topics/auth/index`.
activated. For more, see
:doc:`/topics/auth/index`.
.. attribute:: HttpRequest.session
.. attribute:: HttpRequest.session
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment