0
0
mirror of https://github.com/django/django.git synced 2024-11-30 07:06:18 +01:00

Fixed #23287 -- Updated error message for classonlymethod decorator.

This commit is contained in:
Tim Graham 2014-08-15 09:03:43 -04:00
parent e122facbd8
commit 64bb122c3d

View File

@ -8,7 +8,7 @@ from django.utils import six
class classonlymethod(classmethod): class classonlymethod(classmethod):
def __get__(self, instance, owner): def __get__(self, instance, owner):
if instance is not None: 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) return super(classonlymethod, self).__get__(instance, owner)