summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
Diffstat (limited to 'django')
-rw-r--r--django/views/generic/base.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/django/views/generic/base.py b/django/views/generic/base.py
index 23e18c54a0..d0045a2ef0 100644
--- a/django/views/generic/base.py
+++ b/django/views/generic/base.py
@@ -54,8 +54,9 @@ class View(object):
"keyword argument to %s(). Don't do that."
% (key, cls.__name__))
if not hasattr(cls, key):
- raise TypeError("%s() received an invalid keyword %r" % (
- cls.__name__, key))
+ raise TypeError("%s() received an invalid keyword %r. as_view "
+ "only accepts arguments that are already "
+ "attributes of the class." % (cls.__name__, key))
def view(request, *args, **kwargs):
self = cls(**initkwargs)