mirror of
https://github.com/django/django.git
synced 2024-11-29 22:56:46 +01:00
Fixed #23287 -- Updated error message for classonlymethod decorator.
This commit is contained in:
parent
e122facbd8
commit
64bb122c3d
@ -8,7 +8,7 @@ from django.utils import six
|
||||
class classonlymethod(classmethod):
|
||||
def __get__(self, instance, owner):
|
||||
if instance is not None:
|
||||
raise AttributeError("This method is available only on the view class.")
|
||||
raise AttributeError("This method is available only on the class, not on instances.")
|
||||
return super(classonlymethod, self).__get__(instance, owner)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user