wcs, category cell: remove the possibility to link to internal pages (#7421)

This commit is contained in:
Thomas NOËL 2015-05-29 16:02:37 +02:00
parent e53d411fb2
commit c532e7cb0b
2 changed files with 19 additions and 5 deletions

View File

@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('wcs', '0008_wcsformcell_cached_json'),
]
operations = [
migrations.RemoveField(
model_name='wcscategorycell',
name='link_page',
),
]

View File

@ -110,7 +110,6 @@ class WcsCommonCategoryCell(CellBase):
@register_cell_class
class WcsCategoryCell(WcsCommonCategoryCell):
link_page = models.ForeignKey('data.Page', related_name='link', null=True)
class Meta:
verbose_name = _('Category Link')
@ -124,10 +123,7 @@ class WcsCategoryCell(WcsCommonCategoryCell):
context['slug'] = self.category_reference.split(':')[-1]
context['title'] = self.cached_title
context['description'] = self.cached_description
if self.link_page:
context['url'] = self.link_page.get_online_url()
else:
context['url'] = self.cached_url
context['url'] = self.cached_url
return category_template.render(context)