From 1b4479640e2284c82ad0eb90df1a1661fbb11a90 Mon Sep 17 00:00:00 2001 From: Happy Felix Chukwuma Date: Mon, 23 Sep 2024 16:56:00 +0100 Subject: [PATCH] chore(fix): Increased slugflied max_length to 255 --- .../migrations/0002_alter_article_slug.py | 18 ++++++++++++++++++ server/apps/research/models/article.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 server/apps/research/migrations/0002_alter_article_slug.py diff --git a/server/apps/research/migrations/0002_alter_article_slug.py b/server/apps/research/migrations/0002_alter_article_slug.py new file mode 100644 index 0000000..0636a54 --- /dev/null +++ b/server/apps/research/migrations/0002_alter_article_slug.py @@ -0,0 +1,18 @@ +# Generated by Django 5.0.8 on 2024-09-23 15:55 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('research', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='article', + name='slug', + field=models.SlugField(blank=True, max_length=255), + ), + ] diff --git a/server/apps/research/models/article.py b/server/apps/research/models/article.py index 1aac3b6..9e9b7f5 100644 --- a/server/apps/research/models/article.py +++ b/server/apps/research/models/article.py @@ -25,7 +25,7 @@ class Article(BaseModel): summary = models.TextField(blank=True) acknowledgement = HTMLField(blank=True, null=True) authors = models.ManyToManyField(Author, blank=True, related_name='articles') - slug = models.SlugField(blank=True, db_index=True) + slug = models.SlugField(max_length=255, blank=True, db_index=True) categories = models.ManyToManyField(Category, blank=True, related_name='articles') thumb = models.ImageField(upload_to='images/', default=get_default_thumb, blank=True) views = models.PositiveBigIntegerField(default=0)