Changes between Initial Version and Version 1 of Ticket #32260
- Timestamp:
- Dec 11, 2020, 12:45:40 PM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #32260
- Property Owner changed from to
- Property Status new → assigned
-
Ticket #32260 – Description
initial v1 18 18 19 19 20 I believe this is due to the function `_check_custom_error_handlers` in `django/urls/resolver.py`. The signature variable in this function is expected to match (request, exception) for all handlers except for handler500 which is expected to have only (request). A positional argument, template_name is also present. 20 21 22 While using class based views, we get two positional arguments (self, request) and then it recieves *args and * *kwargs. The check is permitting other handlers as the number of arguments coincidentally match. 21 23 22 23 24 I suggest a fix in the `_check_custom_error_handlers` which first checks if the handler* are function based or class based, and then it preceed the check with the appropriate number of arguments.