#How it works when 404: process_view() hook in Middleware

1 messages · Page 1 of 1 (latest)

unique fiber
#

I tried searching for exactly how request response cycle works and role of process_view in Django:
Here's my understanding so far:

  1. Request Passes through all middleware
  2. URL Dispatcher starts
  • a - If a url is found and corresponding view is found then all middlewares process views are called in order
  • b - else 404 page not found is returned and no process view function is called
  1. Whether the page is found or 404 is about to be returned response passes through each middleware again in reverese order....
rustic saddle
#

sounds reasonable to me

#

you could, in theory, use a debugger to step through all the middlewares