Changes between Initial Version and Version 1 of Ticket #32260


Ignore:
Timestamp:
Dec 11, 2020, 12:45:40 PM (4 years ago)
Author:
Daniyal Abbasi
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32260

    • Property Owner changed from nobody to Daniyal Abbasi
    • Property Status newassigned
  • Ticket #32260 – Description

    initial v1  
    1818
    1919
     20I 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.
    2021
     22While 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.
    2123
    22 
    23 
     24I 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.
Back to Top