From b6aa20139742137cb95ed0d579584d882cf9d7d3 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Mon, 30 Oct 2023 12:45:05 +0100 Subject: [PATCH] Use FileField instead of ImageField for pictogram to allow SVG --- .../0015_alter_pictogram_pictogram.py | 17 +++++++++++++++++ umap/models.py | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 umap/migrations/0015_alter_pictogram_pictogram.py diff --git a/umap/migrations/0015_alter_pictogram_pictogram.py b/umap/migrations/0015_alter_pictogram_pictogram.py new file mode 100644 index 00000000..9e60a3c4 --- /dev/null +++ b/umap/migrations/0015_alter_pictogram_pictogram.py @@ -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"), + ), + ] diff --git a/umap/models.py b/umap/models.py index b2d1a9a6..40588399 100644 --- a/umap/models.py +++ b/umap/models.py @@ -284,7 +284,7 @@ class Pictogram(NamedModel): """ attribution = models.CharField(max_length=300) - pictogram = models.ImageField(upload_to="pictogram") + pictogram = models.FileField(upload_to="pictogram") @property def json(self):