linkcell: link_page can be empty (#7400, cont.)

This commit is contained in:
Thomas NOËL 2015-05-29 17:01:47 +02:00
parent c532e7cb0b
commit 6d6bd722e2
2 changed files with 21 additions and 1 deletions

View File

@ -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,
),
]

View File

@ -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'