From 0f2abd8627f530206af722f27a13c48cbd4bcd16 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sat, 26 Dec 2015 22:54:23 +0100 Subject: [PATCH] Make category not required again --- HISTORY.rst | 5 +++++ .../migrations/0013_auto_20160201_2235.py | 20 +++++++++++++++++++ djangocms_blog/models.py | 2 +- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 djangocms_blog/migrations/0013_auto_20160201_2235.py 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 3e74137..074ec84 100644 --- a/djangocms_blog/models.py +++ b/djangocms_blog/models.py @@ -99,7 +99,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')