Skip to content

Commit

Permalink
chore(fix): Update article schema for max charfield
Browse files Browse the repository at this point in the history
  • Loading branch information
happychuks committed Aug 21, 2024
1 parent d4d3e62 commit 3fb2cfe
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 5.0.8 on 2024-08-21 18:56

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('research', '0009_alter_article_thumb'),
]

operations = [
migrations.AlterField(
model_name='article',
name='summary',
field=models.CharField(blank=True, max_length=1000),
),
migrations.AlterField(
model_name='article',
name='title',
field=models.CharField(max_length=500),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Generated by Django 5.0.8 on 2024-08-21 21:14

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('research', '0010_alter_article_summary_alter_article_title'),
]

operations = [
migrations.AlterField(
model_name='article',
name='summary',
field=models.TextField(blank=True),
),
migrations.AlterField(
model_name='article',
name='title',
field=models.TextField(),
),
migrations.AlterField(
model_name='author',
name='twitter_username',
field=models.CharField(blank=True, max_length=255, null=True),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Generated by Django 5.0.8 on 2024-08-21 23:29

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('research', '0011_alter_article_summary_alter_article_title_and_more'),
]

operations = [
migrations.AlterField(
model_name='article',
name='summary',
field=models.CharField(blank=True, max_length=255),
),
migrations.AlterField(
model_name='article',
name='title',
field=models.CharField(max_length=255),
),
migrations.AlterField(
model_name='author',
name='twitter_username',
field=models.CharField(blank=True, max_length=100, null=True),
),
]
4 changes: 2 additions & 2 deletions server/apps/research/models/article.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ class Article(BaseModel):
('ready', 'Ready'),
)

title = models.CharField(max_length=500)
title = models.CharField(max_length=255)
content = CKEditor5Field('Text', null=True, blank=True, config_name='extends')
summary = models.CharField(max_length=1000, blank=True)
summary = models.CharField(max_length=255, blank=True)
authors = models.ManyToManyField(Author, blank=True, related_name='articles')
slug = models.SlugField(blank=True)
categories = models.ManyToManyField(Category, blank=True, related_name='articles')
Expand Down

0 comments on commit 3fb2cfe

Please sign in to comment.