2

I have a model for pages I want to make with Wagtail, befitting a blog post, so there are some extra fields. This works fine as far as creating and viewing pages, but when trying to iterate through them it becomes an issue.

For example, when doing something like:

{% for post in self.get_children %}{{ post.date }}</a><br />{% endfor %}

This will return the error

AttributeError at /
'Page' object has no attribute 'date'

Except the child being referred to (there is only one) absoultey has a date attribute, and when viewing the page the date attribute works just as it should.

How do I inform Wagtail about custom page models?

Jake Rankin
  • 714
  • 6
  • 22

0 Answers0