Преглед на файлове

Fixed #27616 -- Fixed incorrect vary_on_headers() example.

Tim Graham преди 8 години
родител
ревизия
5e239ae907
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      docs/ref/request-response.txt

+ 1 - 1
docs/ref/request-response.txt

@@ -359,7 +359,7 @@ Methods
     If a response varies on whether or not it's requested via AJAX and you are
     using some form of caching like Django's :mod:`cache middleware
     <django.middleware.cache>`, you should decorate the view with
-    :func:`vary_on_headers('HTTP_X_REQUESTED_WITH')
+    :func:`vary_on_headers('X-Requested-With')
     <django.views.decorators.vary.vary_on_headers>` so that the responses are
     properly cached.