Add new system check message when custom error handler 'path.to.view' cannot be imported
#29642 added checks for the signatures of custom error handlers.
When the 'path.to.view' cannot be imported, it raises ModuleNotFoundError or ViewDoesNotExist, as seen in this Stack Overflow question:
https://stackoverflow.com/q/55481810/113962
I suggest we catch the exception, and add another check code, e.g.
* **urls.E008**: The custom ``handlerXXX`` view ``'path.to.view'`` cannot be imported.
Change History
(9)
Owner: |
changed from nobody to Alasdair Nicol
|
Status: |
new → assigned
|
Severity: |
Normal → Release blocker
|
Triage Stage: |
Unreviewed → Accepted
|
Type: |
Uncategorized → Bug
|
Description: |
modified (diff)
|
Summary: |
Add new system check message when 'path.to.view' is cannot be imported → Add new system check message when custom error handler 'path.to.view' cannot be imported
|
Patch needs improvement: |
set
|
Patch needs improvement: |
unset
|
Triage Stage: |
Accepted → Ready for checkin
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
Hi Alasdair,
Thanks for the report, and the effort on StackOverflow. I'm happy to take this as improvement on the system check for 2.2.1. (Yes, catching an incorrect path is probably worthwhile.)