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)