mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
Pass subevent to item_descriptions signal
This commit is contained in:
@@ -396,11 +396,11 @@ argument will contain the request object.
|
|||||||
|
|
||||||
item_description = EventPluginSignal()
|
item_description = EventPluginSignal()
|
||||||
"""
|
"""
|
||||||
Arguments: ``item``, ``variation``
|
Arguments: ``item``, ``variation``, ``subevent``
|
||||||
|
|
||||||
This signal is sent out when the description of an item or variation is rendered and allows you to append
|
This signal is sent out when the description of an item or variation is rendered and allows you to append
|
||||||
additional text to the description. You are passed the ``item`` and ``variation`` and expected to return
|
additional text to the description. You are passed the ``item``, ``variation`` and ``subevent``. You are
|
||||||
HTML.
|
expected to return HTML.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
register_cookie_providers = EventPluginSignal()
|
register_cookie_providers = EventPluginSignal()
|
||||||
|
|||||||
@@ -262,7 +262,7 @@ def get_grouped_items(event, subevent=None, voucher=None, channel='web', require
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
item.description = str(item.description)
|
item.description = str(item.description)
|
||||||
for recv, resp in item_description.send(sender=event, item=item, variation=None):
|
for recv, resp in item_description.send(sender=event, item=item, variation=None, subevent=subevent):
|
||||||
if resp:
|
if resp:
|
||||||
item.description += ("<br/>" if item.description else "") + resp
|
item.description += ("<br/>" if item.description else "") + resp
|
||||||
|
|
||||||
@@ -319,7 +319,7 @@ def get_grouped_items(event, subevent=None, voucher=None, channel='web', require
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
var.description = str(var.description)
|
var.description = str(var.description)
|
||||||
for recv, resp in item_description.send(sender=event, item=item, variation=var):
|
for recv, resp in item_description.send(sender=event, item=item, variation=var, subevent=subevent):
|
||||||
if resp:
|
if resp:
|
||||||
var.description += ("<br/>" if var.description else "") + resp
|
var.description += ("<br/>" if var.description else "") + resp
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user