Skip to content
Snippets Groups Projects
Commit c76eeed0 authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

Use abstract ModelWithImageFields for Show model

this renames the fields
- `ppoi` -> `image_ppoi`
- `width` -> `image_width`
- `height` -> `image_height`
and adds the fields `image_credits` and `image_alt_text`.
parent 96c0b93d
No related branches found
No related tags found
No related merge requests found
......@@ -203,7 +203,7 @@ class HostLink(Link):
host = models.ForeignKey(Host, on_delete=models.CASCADE, related_name="links")
class Show(models.Model):
class Show(ModelWithImageFields):
predecessor = models.ForeignKey(
"self",
blank=True,
......@@ -229,17 +229,6 @@ class Show(models.Model):
music_focus = models.ManyToManyField(MusicFocus, blank=True, related_name="shows")
name = models.CharField(max_length=255)
slug = models.CharField(max_length=255, unique=True)
ppoi = PPOIField()
height = models.PositiveIntegerField(blank=True, null=True, editable=False)
width = models.PositiveIntegerField(blank=True, null=True, editable=False)
image = VersatileImageField(
blank=True,
null=True,
upload_to="show_images",
width_field="width",
height_field="height",
ppoi_field="ppoi",
)
logo = models.ImageField(blank=True, null=True, upload_to="show_images")
short_description = models.TextField()
description = models.TextField(blank=True, null=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment