add custom image model, fetch alt text

This commit is contained in:
2024-05-15 04:42:42 +02:00
parent 5540040ea2
commit 71b0a87180
26 changed files with 358 additions and 132 deletions

View File

@ -0,0 +1,30 @@
# Generated by Django 5.0.6 on 2024-05-15 01:40
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("images", "0002_alter_customimage_options_alter_customimage_alt"),
("venues", "0002_venueindex"),
]
operations = [
migrations.RemoveField(
model_name="venuepage",
name="featured_image",
),
migrations.AddField(
model_name="venuepage",
name="featured_image",
field=models.ForeignKey(
blank=True,
help_text="Bilde av lokalet",
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="+",
to="images.customimage",
),
),
]

View File

@ -22,7 +22,7 @@ class VenuePage(Page):
show_in_menus = False
featured_image = models.ForeignKey(
"wagtailimages.Image",
"images.CustomImage",
null=True,
blank=True,
on_delete=models.SET_NULL,