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
87bd1361
Kaydet (Commit)
87bd1361
authored
Kas 27, 2014
tarafından
Berker Peksag
Kaydeden (comit)
Erik Romijn
Kas 27, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #23847 -- Improved the email_check example in the auth documentation.
üst
e9d1f118
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
default.txt
docs/topics/auth/default.txt
+2
-2
No files found.
docs/topics/auth/default.txt
Dosyayı görüntüle @
87bd1361
...
...
@@ -500,7 +500,7 @@ The simple way is to run your test on :attr:`request.user
checks to make sure the user has an email in the desired domain::
def my_view(request):
if not
'@example.com' in request.user.email
:
if not
request.user.email.endswith('@example.com')
:
return HttpResponse("You can't vote in this poll.")
# ...
...
...
@@ -511,7 +511,7 @@ checks to make sure the user has an email in the desired domain::
from django.contrib.auth.decorators import user_passes_test
def email_check(user):
return
'@example.com' in user.email
return
user.email.endswith('@example.com')
@user_passes_test(email_check)
def my_view(request):
...
...
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