Skip to content

Commit

Permalink
- revert blank=True for authors
Browse files Browse the repository at this point in the history
- Add migration file to revert
- uncomment celery from settings.py APPS
  • Loading branch information
happychuks committed Dec 2, 2024
1 parent c1058e8 commit 092f198
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
18 changes: 18 additions & 0 deletions server/apps/research/migrations/0014_alter_article_authors.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 5.0.8 on 2024-12-02 08:20

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('research', '0013_alter_article_authors'),
]

operations = [
migrations.AlterField(
model_name='article',
name='authors',
field=models.ManyToManyField(blank=True, related_name='articles', to='research.author'),
),
]
2 changes: 1 addition & 1 deletion server/apps/research/models/article.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Article(BaseModel):
content = HTMLField(blank=True, null=True)
summary = models.TextField(blank=True)
acknowledgement = HTMLField(blank=True, null=True)
authors = models.ManyToManyField(Author, related_name='articles')
authors = models.ManyToManyField(Author, blank=True, related_name='articles')
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)
Expand Down
2 changes: 1 addition & 1 deletion server/core/config/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

THIRD_PARTY_APPS = [
'corsheaders',
#'django_celery_beat',
'django_celery_beat',
'tinymce',
]

Expand Down

0 comments on commit 092f198

Please sign in to comment.