Skip to content

Commit

Permalink
chore(fix): Increased slugflied max_length to 255
Browse files Browse the repository at this point in the history
  • Loading branch information
happychuks committed Sep 23, 2024
1 parent c1178bc commit 1b44796
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions server/apps/research/migrations/0002_alter_article_slug.py
Original file line number Diff line number Diff line change
@@ -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),
),
]
2 changes: 1 addition & 1 deletion server/apps/research/models/article.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1b44796

Please sign in to comment.