articles_panel is a RepeatingPanel, with the template set to our ‘ArticleView’ Form.
When you set the RepeatingPanel’s
items property to an iterable, the RepeatingPanel creates one instance of its
item_template for each item in the iterable. It also sets the
self.item property of that instance to that item from the iterable.
In this case,
get_articles() returns an iterator over the ‘articles’ table, so the RepeatingPanel will create an instance of ‘ArticleView’ for each row in the data table. Each instance will have its
self.item property set to its row in the ‘articles’ table. The Data Bindings on our ‘ArticleView’ form read data from
self.item, so they will display data from that article.