ImageField validates uploads through Pillow, which can't read SVGs, so a club crest that's a vector logo was rejected outright. Switches to a plain FileField with an extension allowlist (png/jpg/jpeg/gif/webp/svg) instead, and restricts the file picker to image types via the widget's accept attribute.
21 lines
698 B
Python
21 lines
698 B
Python
# Generated by Django 6.0.6 on 2026-07-24 16:40
|
|
|
|
import club.models
|
|
import django.core.validators
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('club', '0014_club_secondary_color'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AlterField(
|
|
model_name='club',
|
|
name='logo',
|
|
field=models.FileField(blank=True, help_text="Shown on the club's own pages. Without one, the club's initials are used.", upload_to=club.models.club_logo_path, validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['png', 'jpg', 'jpeg', 'gif', 'webp', 'svg'])], verbose_name='logo'),
|
|
),
|
|
]
|