Fix tags should not be mandatory

This commit is contained in:
Gabriel Augendre 2021-03-06 14:50:31 +01:00
parent d68f37fd33
commit aab5cedb66
2 changed files with 21 additions and 1 deletions

View 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"
),
),
]

View file

@ -69,7 +69,7 @@ class Article(models.Model):
is_home = models.BooleanField(default=False, blank=True) is_home = models.BooleanField(default=False, blank=True)
custom_css = models.TextField(blank=True) custom_css = models.TextField(blank=True)
draft_key = models.UUIDField(default=uuid.uuid4) 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: class Meta:
ordering = ["-published_at"] ordering = ["-published_at"]