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:
parent
b5eff93fde
commit
b60828ac47
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user