def regions(self, item, inherit_from=None, regions=Regions):
"""regions(self, item, *, inherit_from=None, regions=Regions)
Return a ``Regions`` instance which lazily wraps the
``contents_for_item`` call. This is especially useful in conjunction
with the ``render_region`` template tag. The ``inherit_from`` argument
is directly forwarded to ``contents_for_item`` to allow regions with
inherited content.
"""
return regions(
item=item,
contents=SimpleLazyObject(
lambda: contents_for_item(item, self.plugins(), inherit_from)
),
renderer=self,
)
评论列表
文章目录