diff --git a/website/common/templates/common/content-details.html b/website/common/templates/common/content-details.html index 956a7da..92c2804 100644 --- a/website/common/templates/common/content-details.html +++ b/website/common/templates/common/content-details.html @@ -54,5 +54,16 @@ {% endif %} + + {% if page.location_name and page.location_url %} + + + + + + {{ page.location_name }} + + + {% endif %} {% endwagtailpagecache %} diff --git a/website/talks/migrations/0001_initial.py b/website/talks/migrations/0001_initial.py index a3c5487..48e4fca 100644 --- a/website/talks/migrations/0001_initial.py +++ b/website/talks/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 5.0.1 on 2024-03-01 16:55 +# Generated by Django 5.0.1 on 2024-03-01 17:44 import django.db.models.deletion import django.utils.timezone @@ -163,6 +163,8 @@ class Migration(migrations.Migration): ("duration", models.DurationField()), ("slides_url", models.URLField(blank=True)), ("video_url", models.URLField(blank=True)), + ("location_name", models.CharField(blank=True, max_length=64)), + ("location_url", models.URLField(blank=True)), ( "hero_image", models.ForeignKey( diff --git a/website/talks/models.py b/website/talks/models.py index 076eebf..f47a6bb 100644 --- a/website/talks/models.py +++ b/website/talks/models.py @@ -24,6 +24,9 @@ class TalkPage(BaseContentPage): slides_url = models.URLField(blank=True) video_url = models.URLField(blank=True) + location_name = models.CharField(max_length=64, blank=True) + location_url = models.URLField(blank=True) + content_panels = BaseContentPage.content_panels + [ MultiFieldPanel( [ @@ -32,6 +35,13 @@ class TalkPage(BaseContentPage): ], heading="Media", ), + MultiFieldPanel( + [ + FieldPanel("location_name"), + FieldPanel("location_url"), + ], + heading="Location", + ), FieldPanel("duration"), ]