Created
August 8, 2019 05:24
-
-
Save GeeWee/ac12ec3e914ed5d8321bfa3059374350 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all_chefs = ItalianChef.objects.all() | |
for chef in all_chefs: | |
# Every time we reach the next line, we'll make an extra database call to fetch the | |
# favourite dish. | |
chefs_favourite_dish = chef.favourite_dish | |
print(f"{chef}'s favourite dish is {chefs_favourite_dish}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment