0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

Hooks documentation - fix up admonition formatting

This commit is contained in:
LB Johnston 2023-09-19 07:58:42 +10:00 committed by LB (Ben Johnston)
parent b5eff93fde
commit b60828ac47

View File

@ -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