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
1 changed files with 1 additions and 1 deletions

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)