From 310d58ac3995f3eda0c2886c80777e467e6a5dee Mon Sep 17 00:00:00 2001 From: Happy Felix Chukwuma Date: Thu, 22 Aug 2024 01:13:28 +0100 Subject: [PATCH] chore(fix): Modified Article schema --- .gitignore | 3 ++- .../migrations/0013_alter_article_summary.py | 18 ++++++++++++++++++ .../migrations/0014_alter_article_title.py | 18 ++++++++++++++++++ server/apps/research/models/article.py | 4 ++-- 4 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 server/apps/research/migrations/0013_alter_article_summary.py create mode 100644 server/apps/research/migrations/0014_alter_article_title.py diff --git a/.gitignore b/.gitignore index aea162d..ae8b10a 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,5 @@ vpsSetup.md test.rest db.sqlite3 old-backup-db.sqlite3 - +dump.rdp +client/ \ No newline at end of file diff --git a/server/apps/research/migrations/0013_alter_article_summary.py b/server/apps/research/migrations/0013_alter_article_summary.py new file mode 100644 index 0000000..c998082 --- /dev/null +++ b/server/apps/research/migrations/0013_alter_article_summary.py @@ -0,0 +1,18 @@ +# Generated by Django 5.0.8 on 2024-08-22 00:06 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('research', '0012_alter_article_summary_alter_article_title_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='article', + name='summary', + field=models.TextField(blank=True), + ), + ] diff --git a/server/apps/research/migrations/0014_alter_article_title.py b/server/apps/research/migrations/0014_alter_article_title.py new file mode 100644 index 0000000..f43467c --- /dev/null +++ b/server/apps/research/migrations/0014_alter_article_title.py @@ -0,0 +1,18 @@ +# Generated by Django 5.0.8 on 2024-08-22 00:09 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('research', '0013_alter_article_summary'), + ] + + operations = [ + migrations.AlterField( + model_name='article', + name='title', + field=models.TextField(), + ), + ] diff --git a/server/apps/research/models/article.py b/server/apps/research/models/article.py index 240f3c4..5ffa30a 100644 --- a/server/apps/research/models/article.py +++ b/server/apps/research/models/article.py @@ -20,9 +20,9 @@ class Article(BaseModel): ('ready', 'Ready'), ) - title = models.CharField(max_length=255) + title = models.TextField() content = CKEditor5Field('Text', null=True, blank=True, config_name='extends') - summary = models.CharField(max_length=255, blank=True) + summary = models.TextField(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')