Add location information

This commit is contained in:
Jake Howard 2024-03-01 17:52:14 +00:00
parent b0f1191d8f
commit 1a9d981c7d
Signed by: jake
GPG Key ID: 57AFB45680EDD477
3 changed files with 24 additions and 1 deletions

View File

@ -54,5 +54,16 @@
</a>
</span>
{% endif %}
{% if page.location_name and page.location_url %}
<span class="icon-text">
<a href="{{ page.location_url }}">
<span class="icon">
<i class="fas fa-lg fa-map-marker-alt"></i>
</span>
<span>{{ page.location_name }}</span>
</a>
</span>
{% endif %}
</div>
{% endwagtailpagecache %}

View File

@ -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(

View File

@ -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"),
]