mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +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()
|
||||
"""
|
||||
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
|
||||
additional text to the description. You are passed the ``item`` and ``variation`` and expected to return
|
||||
HTML.
|
||||
additional text to the description. You are passed the ``item``, ``variation`` and ``subevent``. You are
|
||||
expected to return HTML.
|
||||
"""
|
||||
|
||||
register_cookie_providers = EventPluginSignal()
|
||||
|
||||
@@ -262,7 +262,7 @@ def get_grouped_items(event, subevent=None, voucher=None, channel='web', require
|
||||
continue
|
||||
|
||||
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:
|
||||
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
|
||||
|
||||
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:
|
||||
var.description += ("<br/>" if var.description else "") + resp
|
||||
|
||||
|
||||
Reference in New Issue
Block a user