Hooks documentation - fix up admonition formatting

stable/5.1.x
LB Johnston 2023-09-19 07:58:42 +10:00 zatwierdzone przez Sage Abdullah
rodzic 4340196469
commit 21af424f34
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: EB1A33CC51CC0217
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -779,9 +779,9 @@ The `get_url`, `is_shown`, `get_context_data` and `render_html` methods all acce
- `request` - the current request object
- `user_page_permissions` - a `UserPagePermissionsProxy` object for the current user, to test permissions against (deprecated)
```{versionchanged} 5.1
The `user_page_permissions` context variable is deprecated. If you use `user_page_permissions.for_page(page)`, replace it with `page.permissions_for_user(user)` instead. To make queries based on the user's permissions, use `wagtail.permission_policies.pages.PagePermissionPolicy`.
```
```{versionchanged} 5.1
The `user_page_permissions` context variable is deprecated. If you use `user_page_permissions.for_page(page)`, replace it with `page.permissions_for_user(user)` instead. To make queries based on the user's permissions, use `wagtail.permission_policies.pages.PagePermissionPolicy`.
```
```python
from wagtail import hooks