浏览代码

Link to HTTPMethod in Page.handle_options_request() docs

Sage Abdullah 4 月之前
父节点
当前提交
6b84e93259
共有 3 个文件被更改,包括 5 次插入3 次删除
  1. 1 0
      CHANGELOG.txt
  2. 1 0
      docs/releases/6.4.md
  3. 3 3
      wagtail/models/__init__.py

+ 1 - 0
CHANGELOG.txt

@@ -42,6 +42,7 @@ Changelog
  * Docs: Change title of blog index page in tutorial to avoid slug issues (Thibaud Colas)
  * Docs: Fix `wagtailcache` and `wagtailpagecache` examples to not use quotes for the `fragment_name` (Shiv)
  * Docs: Update tutorial to reflect the move of the "Add child page" action to a top-level button in the header as a '+' icon (Clifford Gama)
+ * Docs: Fix link to `HTTPMethod` in `Page.handle_options_request()` docs (Sage Abdullah)
  * Maintenance: Close open files when reading within utils/setup.py (Ataf Fazledin Ahamed)
  * Maintenance: Avoid redundant `ALLOWED_HOSTS` check in `Site.find_for_request` (Jake Howard)
  * Maintenance: Update `CloneController` to ensure that `added`/`cleared` events are not dispatched as cancelable (LB (Ben) Johnston)

+ 1 - 0
docs/releases/6.4.md

@@ -58,6 +58,7 @@ depth: 1
  * Change title of blog index page in tutorial to avoid slug issues (Thibaud Colas)
  * Fix `wagtailcache` and `wagtailpagecache` examples to not use quotes for the `fragment_name` (Shiv)
  * Update tutorial to reflect the move of the "Add child page" action to a top-level button in the header as a '+' icon (Clifford Gama)
+ * Fix link to `HTTPMethod` in `Page.handle_options_request()` docs (Sage Abdullah)
 
 ### Maintenance
 

+ 3 - 3
wagtail/models/__init__.py

@@ -2160,9 +2160,9 @@ class Page(AbstractPage, index.Indexed, ClusterableModel, metaclass=PageBase):
         """
         Returns an ``HttpResponse`` with an ``"Allow"`` header containing the list of
         supported HTTP methods for this page. This method is used instead of
-        :meth:`serve` to handle requests when the OPTIONS HTTP verb is detected (and
-        ``http.HTTPMethod.OPTIONS`` is present in :attr:`allowed_http_methods`
-        for this type of page).
+        :meth:`serve` to handle requests when the ``OPTIONS`` HTTP verb is
+        detected (and :class:`HTTPMethod.OPTIONS <python:http.HTTPMethod>` is
+        present in :attr:`allowed_http_methods` for this type of page).
         """
         return HttpResponse(
             headers={"Allow": ", ".join(self.allowed_http_method_names())}