From df7dff844b48cad80844a7fbf75af89706e79525 Mon Sep 17 00:00:00 2001 From: Philip Sargent at home Date: Tue, 31 Dec 2024 07:23:31 +0000 Subject: [PATCH] _set - online edit of handbook/troggle/trogdjango.html --- handbook/troggle/trogdjango.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handbook/troggle/trogdjango.html b/handbook/troggle/trogdjango.html index 321bec2e9..a14eddce5 100644 --- a/handbook/troggle/trogdjango.html +++ b/handbook/troggle/trogdjango.html @@ -22,7 +22,7 @@
  • Cave.objects.all()
  • Cave.caveandentrance_set.all -note that the suffix on a name '_set' actually denotes a function call to the database to find all objects of class "CaveAndEntrance" which are foreign-keyed on that object "Cave". Don't let this upset you. Yes, at a deeper level there is SQL happening. (The underline character and lower-casing usually denotes a dereferencing operation in Django queries, but in this case it is a + note that the suffix on a name '_set' actually denotes a function call to the database to find all objects of class "CaveAndEntrance" which are foreign-keyed on that object "Cave". Don't let this upset you. Yes, at a deeper level there is SQL happening. (The underline character and lower-casing usually denotes a dereferencing operation in Django queries, but in this case it is a backwards relation, but we don't do anything that devious in troggle.)
  • You will get very familiar with the online documentation. be sure to be looking that the flavour for the right release of Django (indicated on the bottom-right of the screen: the link here goes to v3.2). You can read it in Polish, Indonesian, Brazilian-Portuguese or whatever if you prefer.