You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en/add_wagtail_to_your_website/wagtail_integration_adding_posts/README.md
+1-2
Original file line number
Diff line number
Diff line change
@@ -41,8 +41,7 @@ class BlogPage(Page):
41
41
```
42
42
43
43
Before we move on, we will make some comparisons between our `Post` and `BlogPage` models.
44
-
- Our `Post` model contains a field named `title` which we won't define in it our `BlogPage` model because our base
45
-
model `Page` already contains a field by that name so we don’t need to define it because it’s there already.
44
+
- Our `Post` model contains a field named `title`. We won't define it in our `BlogPage` model because our base model `Page` already includes a field with the same name. So, there's no need to define it again since it's already there.
46
45
- We also do not have the `publish` method as this is again handled by a method in our `Page` model.
47
46
- The `Page` class also takes care of the string representation for our `BlogPage` model hence we do not have to define
48
47
a `__str__()` method in the model as we already inherited that.
0 commit comments