From 6d6bd722e2d602b46a95fe52fd028d2b1bd4fd55 Mon Sep 17 00:00:00 2001 From: Thomas NOEL Date: Fri, 29 May 2015 17:01:47 +0200 Subject: [PATCH] linkcell: link_page can be empty (#7400, cont.) --- .../migrations/0008_auto_20150529_1504.py | 20 +++++++++++++++++++ combo/data/models.py | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 combo/data/migrations/0008_auto_20150529_1504.py diff --git a/combo/data/migrations/0008_auto_20150529_1504.py b/combo/data/migrations/0008_auto_20150529_1504.py new file mode 100644 index 00000000..9dae1a69 --- /dev/null +++ b/combo/data/migrations/0008_auto_20150529_1504.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('data', '0007_auto_20150529_1003'), + ] + + operations = [ + migrations.AlterField( + model_name='linkcell', + name='link_page', + field=models.ForeignKey(related_name='link_cell', blank=True, to='data.Page', null=True), + preserve_default=True, + ), + ] diff --git a/combo/data/models.py b/combo/data/models.py index 9723e0ff..33f8f07b 100644 --- a/combo/data/models.py +++ b/combo/data/models.py @@ -442,7 +442,7 @@ class MenuCell(CellBase): class LinkCell(CellBase): title = models.CharField(_('Title'), max_length=150, blank=True) url = models.URLField(_('URL'), blank=True) - link_page = models.ForeignKey('data.Page', related_name='link_cell', null=True) + link_page = models.ForeignKey('data.Page', related_name='link_cell', blank=True, null=True) anchor = models.CharField(_('Anchor'), max_length=150, blank=True) template_name = 'combo/link-cell.html'