@classmethod
    def get_templates_hierarchy(cls, **kwargs):
        templates = kwargs.get('hierarchy', (
            'widgy/{app_label}/{model_name}/{template_name}{extension}',
            'widgy/{app_label}/{template_name}{extension}',
            'widgy/{template_name}{extension}',
        ))
        kwargs.setdefault('extension', '.html')

        ret = []
        for template in templates:
            for parent_cls in cls.__mro__:
                try:
                    ret.extend(
                        template.format(**i) for i in parent_cls.get_template_kwargs(**kwargs)
                    )
                except __HOLE__:
                    pass
        # This must return a list or tuple because
        # django.template.render_to_string does a typecheck.
        return ret
dataset/ETHPy150Open fusionbox/django-widgy/widgy/models/base.py/Content.get_templates_hierarchy