Quellcode durchsuchen

Fixed #35401 -- Documented the conditional_page() decorator.

lufafajoshua vor 9 Monaten
Ursprung
Commit
e2428292ab
2 geänderte Dateien mit 8 neuen und 0 gelöschten Zeilen
  1. 3 0
      docs/ref/middleware.txt
  2. 5 0
      docs/topics/http/decorators.txt

+ 3 - 0
docs/ref/middleware.txt

@@ -153,6 +153,9 @@ header, the middleware adds one if needed. If the response has an ``ETag`` or
 ``If-Modified-Since``, the response is replaced by an
 :class:`~django.http.HttpResponseNotModified`.
 
+You can handle conditional GET operations with individual views using the
+:func:`~django.views.decorators.http.conditional_page()` decorator.
+
 Locale middleware
 -----------------
 

+ 5 - 0
docs/topics/http/decorators.txt

@@ -63,6 +63,11 @@ control caching behavior on particular views.
 
 .. function:: condition(etag_func=None, last_modified_func=None)
 
+.. function:: conditional_page()
+
+    This decorator provides the conditional GET operation handling of
+    :class:`~django.middleware.http.ConditionalGetMiddleware` to a view.
+
 .. function:: etag(etag_func)
 
 .. function:: last_modified(last_modified_func)