@classmethod
def add_factory(cls, abbr_mimetype, template_factory, id_function=None):
    """adds a template factory to the already known factories"""
    cls.factories[abbr_mimetype] = template_factory
    if id_function is not None:
        cls.mime_func.append(id_function)
