def all_templates():
 templates = defaultdict(list)
 for (category, descriptor) in XBlock.load_classes():
  if (not hasattr(descriptor, 'templates')):
   continue
  templates[category] = descriptor.templates()
 return templates

def all_templates ( ) : templates = defaultdict ( list ) for ( category , descriptor ) in XBlock . load_classes ( ) : if ( not hasattr ( descriptor , 'templates' ) ) : continue templates [ category ] = descriptor . templates ( ) return templates
returns all templates for enabled modules .