

@presentation.render_for(Board, model='background_image')
def render_board_background_image(self, h, comp, *args):
    fileid = self.data.background_image
    try:
        metadata = self.assets_manager.get_metadata(fileid)
        src = self.assets_manager.get_image_url(fileid, 'medium')
        src += ('?r=' + h.generate_id())
        return h.img(title=metadata['filename'], alt=metadata['filename'], src=src)
    except Exception:
        return _('No background selected')

dataset/ETHPy150Open Net-ng/kansha/kansha/board/view.py render_board_background_image/original