From be9e40cf2d84cc922378ed83291838159b7ef264 Mon Sep 17 00:00:00 2001 From: Philip Sargent at home Date: Tue, 31 Dec 2024 07:21:36 +0000 Subject: [PATCH] _set - online edit of handbook/troggle/trogforms.html --- handbook/troggle/trogforms.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handbook/troggle/trogforms.html b/handbook/troggle/trogforms.html index c2ae21e24..c8ba3b2c2 100644 --- a/handbook/troggle/trogforms.html +++ b/handbook/troggle/trogforms.html @@ -50,7 +50,7 @@ But if you haven't worked with HTML forms before, then you actually have In logbookentry.html you will see the Django template code {% for personlogentry in logbookentry.personlogentry_set.all %} - which illustrates the for loop syntax, but also the my_object.attribute syntax, where the attribute is a one-to-many link to other Objects (instances of a Class) and has the function "_set" applied followed by the QuerySet function ".all". The effect of the for loop is to iterate through all the "personlogentry" instances referenced by the specific "logbookentry" the page is looking at. + which illustrates the for loop syntax, but also the my_object.attribute syntax, where the attribute is a one-to-many link to other Objects (instances of a Class) and has the function "_set" applied followed by the QuerySet function ".all". The effect of the for loop is to iterate through all the "personlogentry" instances referenced by the specific "logbookentry" the page is looking at.

For the relationship between LogBookEntry and PersonLogEntry click on the Class diagram on the right.