Skip to content

A place to practice working w/ Django templates and views

Notifications You must be signed in to change notification settings

AnniePawl/Django-Book-Site

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django Book Site Assignment

How would we filter for all books with titles containing the word ‘Django’?
django_books = Book.objects.filter(title__contains = 'Django') django_books

How would we filter for all books with tag ‘Fiction’?
fiction_books = Book.objects.filter(tag='Fiction') fiction_books

How would we filter for all authors who have written books containing the word ‘Django’? HINT: We can use the book field to refer to an author’s books, even though the Author model doesn’t explicitly contain it!
django_authors = Author.objects.filter(title__contains = 'Django') django_authors

About

A place to practice working w/ Django templates and views

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published