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
0b0bb610
Kaydet (Commit)
0b0bb610
authored
May 24, 2015
tarafından
I am Clinton
Kaydeden (comit)
Tim Graham
May 25, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed typos in HTTP decorator docs.
üst
6128005d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
http.py
django/views/decorators/http.py
+3
-3
decorators.txt
docs/topics/http/decorators.txt
+4
-4
No files found.
django/views/decorators/http.py
Dosyayı görüntüle @
0b0bb610
...
...
@@ -47,13 +47,13 @@ def require_http_methods(request_method_list):
return
decorator
require_GET
=
require_http_methods
([
"GET"
])
require_GET
.
__doc__
=
"Decorator to require that a view only accept the GET method."
require_GET
.
__doc__
=
"Decorator to require that a view only accept
s
the GET method."
require_POST
=
require_http_methods
([
"POST"
])
require_POST
.
__doc__
=
"Decorator to require that a view only accept the POST method."
require_POST
.
__doc__
=
"Decorator to require that a view only accept
s
the POST method."
require_safe
=
require_http_methods
([
"GET"
,
"HEAD"
])
require_safe
.
__doc__
=
"Decorator to require that a view only accept safe methods: GET and HEAD."
require_safe
.
__doc__
=
"Decorator to require that a view only accept
s
safe methods: GET and HEAD."
def
_precondition_failed
(
request
):
...
...
docs/topics/http/decorators.txt
Dosyayı görüntüle @
0b0bb610
...
...
@@ -16,7 +16,7 @@ a :class:`django.http.HttpResponseNotAllowed` if the conditions are not met.
.. function:: require_http_methods(request_method_list)
Decorator to require that a view only accept particular request
Decorator to require that a view only accept
s
particular request
methods. Usage::
from django.views.decorators.http import require_http_methods
...
...
@@ -31,15 +31,15 @@ a :class:`django.http.HttpResponseNotAllowed` if the conditions are not met.
.. function:: require_GET()
Decorator to require that a view only accept the GET method.
Decorator to require that a view only accept
s
the GET method.
.. function:: require_POST()
Decorator to require that a view only accept the POST method.
Decorator to require that a view only accept
s
the POST method.
.. function:: require_safe()
Decorator to require that a view only accept the GET and HEAD methods.
Decorator to require that a view only accept
s
the GET and HEAD methods.
These methods are commonly considered "safe" because they should not have
the significance of taking an action other than retrieving the requested
resource.
...
...
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