aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/utils
diff options
context:
space:
mode:
authorChristopher Paolini2013-08-17 17:52:08 -0400
committerChristopher Paolini2013-08-17 17:52:08 -0400
commit11d7c1838a1146728528d762cdf6bf329321c1d1 (patch)
tree5d709e7b1129075297d998db8a7ff7aa056b0021 /rest_framework/utils
parente6662d434f0214d21d38e4388a40fd63e1f9dcc6 (diff)
downloaddjango-rest-framework-11d7c1838a1146728528d762cdf6bf329321c1d1.tar.bz2
Updated default view name/description functions
Forgot to update the default view name/description functions to the new setup.
Diffstat (limited to 'rest_framework/utils')
-rw-r--r--rest_framework/utils/formatting.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/rest_framework/utils/formatting.py b/rest_framework/utils/formatting.py
index 5780301a..89a89252 100644
--- a/rest_framework/utils/formatting.py
+++ b/rest_framework/utils/formatting.py
@@ -56,8 +56,8 @@ def markup_description(description):
return mark_safe(description)
-def view_name(cls, suffix=None):
- name = cls.__name__
+def view_name(instance, view, suffix=None):
+ name = view.__name__
name = _remove_trailing_string(name, 'View')
name = _remove_trailing_string(name, 'ViewSet')
name = _camelcase_to_spaces(name)
@@ -66,8 +66,8 @@ def view_name(cls, suffix=None):
return name
-def view_description(cls, html=False):
- description = cls.__doc__ or ''
+def view_description(instance, view, html=False):
+ description = view.__doc__ or ''
description = _remove_leading_indent(smart_text(description))
if html:
return markup_description(description)