From 791f031e16abf84580e83f6b87e516905d99ec07 Mon Sep 17 00:00:00 2001 From: Clifford Gama Date: Fri, 15 Nov 2024 19:55:19 +0200 Subject: [PATCH] Fix minor typo - capitalize Page model --- docs/tutorial/customize_homepage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/customize_homepage.md b/docs/tutorial/customize_homepage.md index 87551b5bb8..f7fff7d71e 100644 --- a/docs/tutorial/customize_homepage.md +++ b/docs/tutorial/customize_homepage.md @@ -71,7 +71,7 @@ class HomePage(Page): ] ``` -You might already be familiar with the different parts of your `HomePage` model. The `image` field is a `ForeignKey` referencing Wagtail's built-in Image model for storing images. Similarly, `hero_cta_link` is a `ForeignKey` to `wagtailcore.Page`. The `wagtailcore.Page` is the base class for all other page types in Wagtail. This means all Wagtail pages inherit from `wagtailcore.Page`. For instance, your `class HomePage(page)` inherits from `wagtailcore.Page`. +You might already be familiar with the different parts of your `HomePage` model. The `image` field is a `ForeignKey` referencing Wagtail's built-in Image model for storing images. Similarly, `hero_cta_link` is a `ForeignKey` to `wagtailcore.Page`. The `wagtailcore.Page` is the base class for all other page types in Wagtail. This means all Wagtail pages inherit from `wagtailcore.Page`. For instance, your `class HomePage(Page)` inherits from `wagtailcore.Page`. Using `on_delete=models.SET_NULL` ensures that if you remove an image or hero link from your admin interface, the `image` or `hero_cta_link` fields on your Homepage will be set to null, but the rest of the data will be preserved. Read the [Django documentation on the `on_delete` attribute](django.db.models.ForeignKey.on_delete) for more details.