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
评论列表
文章目录