Opened 10 years ago
Closed 10 years ago
#23287 closed Cleanup/optimization (fixed)
Change exception message for django.utils.decorators.classonlymethod
Reported by: | Peter Zsoldos | Owned by: | Tim Graham |
---|---|---|---|
Component: | Utilities | Version: | |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The exception message when invoking it on an instance is (at the time of opening) is "This method is available only on the view class."
However, there isn't anything about this decorator that is CBV specific, and it is located in the generic django.utils module.
I propose to change the exception message to some variant of "This method is available only on the class, not on instances."
(It came up in a pull request discussion with @timgraham - https://github.com/django/django/pull/2674#discussion_r15948247)
Change History (2)
comment:1 by , 10 years ago
Component: | Uncategorized → Utilities |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
In 64bb122c3dede3538294bab07d5f1a1980713d31: