code: def register(self, cls):
          
          preview = cls(site=self)
          logger.debug('Registering %r with %r', preview, self)
          index = self.__previews.setdefault(preview.module, {})
          index[cls.__name__] = preview
docs: Adds a preview to the index.