mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-24 19:17:48 +01:00
Clarify get_context() usage in BlogTagIndexPage example (#12573)
This commit is contained in:
parent
e7dd00e427
commit
9509d6409f
@ -34,6 +34,7 @@ Changelog
|
||||
* Docs: Replace absolute URLs with intersphinx links where possible to avoid broken links (Sage Abdullah)
|
||||
* Docs: Update upgrading guide and release process to better reflect the current practices (Sage Abdullah)
|
||||
* Docs: Document usage of custom validation for admin form pages when using `AbstractEmailForm` or `AbstractForm` pages (John-Scott Atlakson, LB (Ben) Johnston)
|
||||
* Docs: Reword `BlogTagIndexPage` example for clarity (Clifford Gama)
|
||||
* 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)
|
||||
|
@ -854,6 +854,7 @@
|
||||
* manu
|
||||
* Aayushman Singh
|
||||
* Steven Steinwand
|
||||
* Clifford Gama
|
||||
|
||||
## Translators
|
||||
|
||||
|
@ -921,8 +921,8 @@ class BlogTagIndexPage(Page):
|
||||
Note that this Page-based model defines no fields of its own.
|
||||
Even without fields, subclassing `Page` makes it a part of the
|
||||
Wagtail ecosystem, so that you can give it a title and URL in the
|
||||
admin, and so that you can manipulate its contents by returning
|
||||
a QuerySet from its `get_context()` method.
|
||||
admin. You can also override its `get_context()` method to add a
|
||||
QuerySet to the context dictionary, making it available to the template.
|
||||
|
||||
Migrate this by running `python manage.py makemigrations` and then `python manage.py migrate`. After migrating the new changes, create a new `BlogTagIndexPage` in the admin interface. To create the `BlogTagIndexPage`, follow the same process you followed in creating the `BlogIndexPage` and give it the slug "tags" on the Promote tab. This means the `BlogTagIndexPage` is a child of the home page and parallel to `Our Blog` in the admin interface.
|
||||
|
||||
|
@ -50,6 +50,7 @@ depth: 1
|
||||
* Replace absolute URLs with intersphinx links where possible to avoid broken links (Sage Abdullah)
|
||||
* Update upgrading guide and release process to better reflect the current practices (Sage Abdullah)
|
||||
* Document usage of [Custom validation for admin form pages](form_builder_custom_admin_validation) when using `AbstractEmailForm` or `AbstractForm` pages (John-Scott Atlakson, LB (Ben) Johnston)
|
||||
* Reword `BlogTagIndexPage` example for clarity (Clifford Gama)
|
||||
|
||||
### Maintenance
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user