From 3e9534dc5096e4aaf4a075dae8cf5baf17f27b24 Mon Sep 17 00:00:00 2001 From: Thibault Jouannic Date: Mon, 7 Oct 2024 15:35:10 +0200 Subject: [PATCH] Increase url mapping max length --- .../migrations/0003_alter_urlmapping_url.py | 18 ++++++++++++++++++ envergo/urlmappings/models.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 envergo/urlmappings/migrations/0003_alter_urlmapping_url.py diff --git a/envergo/urlmappings/migrations/0003_alter_urlmapping_url.py b/envergo/urlmappings/migrations/0003_alter_urlmapping_url.py new file mode 100644 index 000000000..b0362bbf5 --- /dev/null +++ b/envergo/urlmappings/migrations/0003_alter_urlmapping_url.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.13 on 2024-10-07 13:34 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("urlmappings", "0002_urlmapping_created_at"), + ] + + operations = [ + migrations.AlterField( + model_name="urlmapping", + name="url", + field=models.URLField(max_length=2048), + ), + ] diff --git a/envergo/urlmappings/models.py b/envergo/urlmappings/models.py index d56cf6f71..4524273ed 100644 --- a/envergo/urlmappings/models.py +++ b/envergo/urlmappings/models.py @@ -21,7 +21,7 @@ class UrlMapping(models.Model): """A mapping between a short key and a URL.""" key = models.CharField(max_length=20, unique=True, default=generate_key) - url = models.URLField() + url = models.URLField(max_length=2048) created_at = models.DateTimeField(_("Date created"), default=timezone.now) def __str__(self):