5. Views and Django Templates
Next we need a way to let visitors to our RescueScout app browse the animals at the shelter. We'll do that by adding views, the templates they render, and the URL patterns that point to them.
Along the way, we'll cover:
- Views and URL patterns: Writing views that render templates, and URL patterns that route each path to its view.
- Templates: Django's template language and extending base templates.
- Generic and class-based views: Using
ListViewto handle pagination, andDetailViewto return a 404 automatically for an animal that doesn't exist.