[Answer]-Generate view description based on parent docstring

1👍

The solution is to overload the get_view_description method in child view like :

class ChildView(ParentView):
    def get_view_description(self, html=False):
        """
        Get the view description based on the parent class docstring
        """
        func = self.settings.VIEW_DESCRIPTION_FUNCTION
        return func(self.__class__.__base__, html)

Doing so, you should be able to have your child view documented by the parent docstring.

Leave a comment