diff --git a/combo/apps/wcs/migrations/0009_remove_wcscategorycell_link_page.py b/combo/apps/wcs/migrations/0009_remove_wcscategorycell_link_page.py new file mode 100644 index 00000000..b5062fa9 --- /dev/null +++ b/combo/apps/wcs/migrations/0009_remove_wcscategorycell_link_page.py @@ -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', + ), + ] diff --git a/combo/apps/wcs/models.py b/combo/apps/wcs/models.py index 97983c06..c4a3e2eb 100644 --- a/combo/apps/wcs/models.py +++ b/combo/apps/wcs/models.py @@ -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)