Changes between Initial Version and Version 1 of Ticket #30101, comment 4
- Timestamp:
- Jan 22, 2019, 8:32:03 AM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #30101, comment 4
initial v1 7 7 It treats views and middlewares as if they were equivalent, which they are not. 8 8 9 Django's `BaseHandler` provides a `_get_response()` method that uses the `URLConf ` and `URLResolver` to determine the callback (i.e. view function) and parameters to pass to the view. ([https://github.com/django/django/blob/d02b2aa11e5b6c351a9a2c0673c23569889f90d6/django/core/handlers/base.py#L100-L101 django/core/handlers/base.py].)9 Django's `BaseHandler` provides a `_get_response()` method that uses the `URLConf ` and `URLResolver` to determine the callback (i.e. view function) plus the parameters to pass to it. ([https://github.com/django/django/blob/d02b2aa11e5b6c351a9a2c0673c23569889f90d6/django/core/handlers/base.py#L100-L101 django/core/handlers/base.py].) 10 10 11 11 It's this `_get_response()` that sits at the center of the ''Middleware Onion™''. You can't just pass in a view.