Last active
March 18, 2022 15:54
-
-
Save PaulSebalu/847a0b8f9439ce37cafe685f3ba788aa to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Link to repo: https://github.com/PaulSebalu/bookstore | |
# using the interactive shell: "python manage.py shell" | |
from store.models import Book | |
books = Book.objects.select_related('author').all() | |
for book in books: | |
f"\"{book.title}\". {book.author.name}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment