1
0
Fork 0
mirror of https://github.com/Kunsi/pretalx-plugin-broadcast-tools synced 2024-12-24 16:09:12 +00:00

add TALK_URL and FEEDBACK_URL to the list of placeholders

This commit is contained in:
Franzi 2023-02-28 10:17:50 +01:00
parent 97784373c0
commit 11afb88602
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 18 additions and 2 deletions

View file

@ -37,8 +37,14 @@
<dt><code>{EVENT_SLUG}</code></dt>
<dd>Use to embed the event slug.</dd>
<dt><code>{FEEDBACK_URL}</code></dt>
<dd>URL to the talk feedback page.</dd>
<dt><code>{TALK_SLUG}</code></dt>
<dd>Use to embed the talk slug.</dd>
<dt><code>{TALK_URL}</code></dt>
<dd>URL to the talk detail page.</dd>
</dl>
<fieldset>

View file

@ -1,6 +1,16 @@
from django.conf import settings
def placeholders(schedule, talk):
return {
"EVENT_SLUG": str(schedule.event.slug),
"TALK_SLUG": talk.frab_slug,
"CODE": talk.submission.code,
"EVENT_SLUG": str(schedule.event.slug),
"FEEDBACK_URL": "{}{}".format(
schedule.event.custom_domain or settings.SITE_URL,
talk.submission.urls.feedback,
),
"TALK_SLUG": talk.frab_slug,
"TALK_URL": "{}{}".format(
schedule.event.custom_domain or settings.SITE_URL,
talk.submission.urls.public,
),
}