blocks.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:wagtailmodelchooser 作者: takeflight 项目源码 文件源码
def __init__(self, target_model, filter_name=None, **kwargs):
        super(ModelChooserBlock, self).__init__(**kwargs)
        self._target_model = target_model

        self.filter_name = filter_name

        if self.meta.icon == 'placeholder':
            # Get the icon from the chooser.
            # The chooser may not have been registered yet, depending upon
            # import orders and things, so get the icon lazily
            self.meta.icon = lazy(lambda: self.chooser.icon, str)()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号