Increase url size from 200 to 2000

This commit is contained in:
Gabriel Augendre 2022-01-26 11:39:47 +01:00
parent 2b621c044f
commit e932f764e2
2 changed files with 19 additions and 1 deletions

View file

@ -0,0 +1,18 @@
# Generated by Django 3.2.4 on 2022-01-26 10:39
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('redirect', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='redirect',
name='target_url',
field=models.URLField(max_length=2000),
),
]

View file

@ -4,7 +4,7 @@ from django.db import models
class Redirect(models.Model):
short_code = models.CharField(max_length=250, blank=False, null=False, unique=True)
target_url = models.URLField()
target_url = models.URLField(max_length=2000)
def __str__(self):
return f"{self.short_code} => {self.target_url}"