The request cycle
A URL arrives, Django matches it to a view, the view does the work, it asks a template to render, and a response goes back.
# 1. urls.py which view handles this address
# 2. views.py the work: read input, query, decide
# 3. models.py the data, via the ORM
# 4. template HTML with the values filled in
# 5. response sent back to the browser- When something is wrong, work out which of the five steps it is in before changing anything.
- A 404 is step 1. A 500 is usually step 2 or 3. A blank spot on the page is usually step 4.