decorator_from_middleware() doesn't call process_view() properly
|Reported by:||Gulopine||Owned by:||gwilson|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
In django.utils.decorators.decorator_from_middleware(), the portion which calls the middleware's process_view() method does with the dynamic argument modifies * and **, even though the middleware protocol specifies that the args and kwargs values should come in as separate distinct arguments.
If this function is used to transform any middleware that implements the process_view() method into a decorator, a TypeError is raised when any view using that decorator is executed.
TypeError: process_view() got an unexpected keyword argument '...'
Change History (4)
Changed 6 years ago by Gulopine
comment:1 Changed 6 years ago by Simon G <dev at simon dot net dot nz>
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Ready for checkin
comment:2 Changed 6 years ago by gwilson
- Owner changed from nobody to gwilson
- Status changed from new to assigned