Skip to content

Commit

Permalink
Remove unused base_views.get_view_description()
Browse files Browse the repository at this point in the history
get_view_description() function is not exported and it's not used in
scope of module.

Signed-off-by: Ivan Remizov <[email protected]>
  • Loading branch information
akaRem committed Jul 15, 2018
1 parent edadad7 commit 344ae9c
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions galaxy/api/views/base_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,26 +63,6 @@ def get_view_name(cls, suffix=None):
return views.get_view_name(cls, suffix=None)


def get_view_description(cls, html=False):
"""
Wrapper around REST framework get_view_description() to support
get_description() method and view_description property on a view class.
"""
if hasattr(cls, 'get_description') and callable(cls.get_description):
desc = cls().get_description(html=html)
cls = type(cls.__name__, (object,), {'__doc__': desc})
elif hasattr(cls, 'view_description'):
if callable(cls.view_description):
view_desc = cls.view_description()
else:
view_desc = cls.view_description
cls = type(cls.__name__, (object,), {'__doc__': view_desc})
desc = views.get_view_description(cls, html=html)
if html:
desc = '<div class="description">%s</div>' % desc
return mark_safe(desc)


class APIView(views.APIView):

def get_authenticate_header(self, request):
Expand Down

0 comments on commit 344ae9c

Please sign in to comment.