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
97886252
Kaydet (Commit)
97886252
authored
Eki 30, 2015
tarafından
Bryan Marty
Kaydeden (comit)
Tim Graham
Kas 12, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #25169 -- Documented stacking of permission_required and login_required.
üst
9a2aca60
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
default.txt
docs/topics/auth/default.txt
+11
-0
No files found.
docs/topics/auth/default.txt
Dosyayı görüntüle @
97886252
...
...
@@ -687,6 +687,17 @@ The ``permission_required`` decorator
(HTTP Forbidden) view<http_forbidden_view>` instead of redirecting to the
login page.
If you want to use ``raise_exception`` but also give your users a chance to
login first, you can add the
:func:`~django.contrib.auth.decorators.login_required` decorator::
from django.contrib.auth.decorators import login_required, permission_required
@permission_required('polls.can_vote', raise_exception=True)
@login_required
def my_view(request):
...
.. versionchanged:: 1.9
In older versions, the ``permission`` parameter only worked with
...
...
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