Fix tags should not be mandatory
This commit is contained in:
parent
d68f37fd33
commit
aab5cedb66
2 changed files with 21 additions and 1 deletions
20
articles/migrations/0032_auto_20210306_1449.py
Normal file
20
articles/migrations/0032_auto_20210306_1449.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
# Generated by Django 3.1.5 on 2021-03-06 13:49
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("articles", "0031_auto_20210306_1449"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="article",
|
||||
name="tags",
|
||||
field=models.ManyToManyField(
|
||||
blank=True, related_name="articles", to="articles.Tag"
|
||||
),
|
||||
),
|
||||
]
|
|
@ -69,7 +69,7 @@ class Article(models.Model):
|
|||
is_home = models.BooleanField(default=False, blank=True)
|
||||
custom_css = models.TextField(blank=True)
|
||||
draft_key = models.UUIDField(default=uuid.uuid4)
|
||||
tags = models.ManyToManyField(to=Tag, related_name="articles")
|
||||
tags = models.ManyToManyField(to=Tag, related_name="articles", blank=True)
|
||||
|
||||
class Meta:
|
||||
ordering = ["-published_at"]
|
||||
|
|
Reference in a new issue