Use FileField instead of ImageField for pictogram to allow SVG

This commit is contained in:
Yohan Boniface 2023-10-30 12:45:05 +01:00
parent e5c616b49c
commit b6aa201397
2 changed files with 18 additions and 1 deletions

View file

@ -0,0 +1,17 @@
# Generated by Django 4.2.2 on 2023-10-30 11:27
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("umap", "0014_map_created_at"),
]
operations = [
migrations.AlterField(
model_name="pictogram",
name="pictogram",
field=models.FileField(upload_to="pictogram"),
),
]

View file

@ -284,7 +284,7 @@ class Pictogram(NamedModel):
""" """
attribution = models.CharField(max_length=300) attribution = models.CharField(max_length=300)
pictogram = models.ImageField(upload_to="pictogram") pictogram = models.FileField(upload_to="pictogram")
@property @property
def json(self): def json(self):