Skip to content

Commit

Permalink
Add a venue name and map link to the description
Browse files Browse the repository at this point in the history
It's already in the location field of the ICS, but it's also convenient to have
a map link. So why not.
  • Loading branch information
lukegb committed May 24, 2024
1 parent dc5f2cb commit 10fc95d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion apps/schedule/feeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,18 @@ def _format_event_description(event):
description += "\n\nAttending this workshop will cost: " + event["cost"]
description += "\nSuitable age range: " + event["age_range"]
description += "\nAttendees should bring: " + event["equipment"]

footer_block = []
if event["link"]:
description += "\n\nLink: " + event["link"]
footer_block.append(f'Link: {event["link"]}')
if event["venue"]:
venue_str = event["venue"]
if event["map_link"]:
venue_str = f'{venue_str} ({event["map_link"]})'
footer_block.append(f'Venue: {venue_str}')
if footer_block:
description += '\n\n' + '\n'.join(footer_block)

return description


Expand Down

0 comments on commit 10fc95d

Please sign in to comment.