Django More Models
Posted on Jun 23rd, 2021
🗓️ Today’s Topics
- Many-to-many model relationships & queries
- Slugs
✅ Questions to Check Your Understanding
- If you want to show one particular book in the browser, how would that work in the urls and the views?
- How do forms work in Django? You should be able to talk about form objects and how forms are handled in the views.
- Can you create new objects, find objects, and find related objects in the Django shell?
- How does Django know if a user is logged in?
- How can you implement books with multiple categories?
🎯 Project: FreeShelf Wrap Up
Your FreeShelf project is due on Thursday morning.
Resources
- Tips for using Django’s Many-to-Many Field
- Django Docs: Related Objects Reference
- Creating Interactive Views in Django - great post really breaking down views
- Django Slug Tutorial
- Django Docs: Built-in Template Tags and Filters