diff --git a/HISTORY.rst b/HISTORY.rst index 9721b4f..b2cfb9a 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,11 @@ History ------- +0.6.4 (unreleased) +++++++++++++++++++ + +* Make categories non required + 0.6.3 (2015-12-22) ++++++++++++++++++ diff --git a/djangocms_blog/migrations/0013_auto_20160201_2235.py b/djangocms_blog/migrations/0013_auto_20160201_2235.py new file mode 100644 index 0000000..ffdafe1 --- /dev/null +++ b/djangocms_blog/migrations/0013_auto_20160201_2235.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.2 on 2016-02-01 21:35 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('djangocms_blog', '0012_auto_20151220_1734'), + ] + + operations = [ + migrations.AlterField( + model_name='post', + name='categories', + field=models.ManyToManyField(blank=True, related_name='blog_posts', to='djangocms_blog.BlogCategory', verbose_name='category'), + ), + ] diff --git a/djangocms_blog/models.py b/djangocms_blog/models.py index c65ce8e..e0fa27e 100644 --- a/djangocms_blog/models.py +++ b/djangocms_blog/models.py @@ -100,7 +100,7 @@ class Post(ModelMeta, TranslatableModel): blank=True) publish = models.BooleanField(_('publish'), default=False) categories = models.ManyToManyField('djangocms_blog.BlogCategory', verbose_name=_('category'), - related_name='blog_posts',) + related_name='blog_posts', blank=True) main_image = FilerImageField(verbose_name=_('main image'), blank=True, null=True, on_delete=models.SET_NULL, related_name='djangocms_blog_post_image')