A. To handle database migrations
B. To retrieve an object from the database or return a 404 error
C. To manage static files
D. To define URL patterns