groups.py 文件源码

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

项目:django-oscar-bluelight 作者: thelabnyc 项目源码 文件源码
def register_system_offer_group(slug, default_name=None):
    """
    Register a system offer group (an offer group that referenced by code). Returns the OfferGroup instance.

    To get / create a system offer group, call this function somewhere in your code base and assign the
    result to a constant. The return value is a lazy evaluated function which will, on-first-access, create the
    OfferGroup. On subsequent accesses, it will simply fetch the offer group and return it.
    """
    lazy_group = SimpleLazyObject(lambda: insupd_system_offer_group(slug, default_name))
    _system_group_registry.append(lazy_group)
    return lazy_group
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号