From ad9e518f5696bd51abbd5f26e8fe9cda1e762ea9 Mon Sep 17 00:00:00 2001 From: Todd Dembrey <todd.dembrey@torchbox.com> Date: Tue, 28 Aug 2018 10:41:12 +0100 Subject: [PATCH] Remove project page introduction --- .../0005_remove_projectpage_introduction.py | 17 +++++++++++++++++ opentech/public/projects/models.py | 5 +---- .../templates/projects/project_page.html | 6 +----- 3 files changed, 19 insertions(+), 9 deletions(-) create mode 100644 opentech/public/projects/migrations/0005_remove_projectpage_introduction.py diff --git a/opentech/public/projects/migrations/0005_remove_projectpage_introduction.py b/opentech/public/projects/migrations/0005_remove_projectpage_introduction.py new file mode 100644 index 000000000..6db1b7ff3 --- /dev/null +++ b/opentech/public/projects/migrations/0005_remove_projectpage_introduction.py @@ -0,0 +1,17 @@ +# Generated by Django 2.0.2 on 2018-08-28 09:40 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('projects', '0004_projectpage_categories'), + ] + + operations = [ + migrations.RemoveField( + model_name='projectpage', + name='introduction', + ), + ] diff --git a/opentech/public/projects/models.py b/opentech/public/projects/models.py index 5dc745f13..1e239998a 100644 --- a/opentech/public/projects/models.py +++ b/opentech/public/projects/models.py @@ -99,7 +99,6 @@ class ProjectPage(FundingMixin, BasePage): subpage_types = [] parent_page_types = ['ProjectIndexPage'] - introduction = models.TextField(blank=True) icon = models.ForeignKey( 'images.CustomImage', null=True, @@ -113,15 +112,13 @@ class ProjectPage(FundingMixin, BasePage): categories = models.TextField(default='{}', blank=True) search_fields = BasePage.search_fields + [ - index.SearchField('introduction'), index.SearchField('body'), ] content_panels = BasePage.content_panels + [ ImageChooserPanel('icon'), - FieldPanel('status'), - FieldPanel('introduction'), StreamFieldPanel('body'), + FieldPanel('status'), InlinePanel('contact_details', label="Contact Details"), ] + FundingMixin.content_panels + [ InlinePanel('related_pages', label="Related Projects"), diff --git a/opentech/public/projects/templates/projects/project_page.html b/opentech/public/projects/templates/projects/project_page.html index ad2f944df..6731a7738 100644 --- a/opentech/public/projects/templates/projects/project_page.html +++ b/opentech/public/projects/templates/projects/project_page.html @@ -6,9 +6,7 @@ <div class="media-box media-box--reverse"> {% include "utils/includes/media_box_icon.html" with page_icon=page.icon %} <div class="media-box__content"> - {% if page.introduction %} - <h5 class="media-box__teaser">{{ page.introduction }}</h5> - {% endif %} + <h5 class="media-box__teaser">{{ page.body }}</h5> </div> </div> @@ -33,8 +31,6 @@ {% include "projects/includes/project_status.html" %} - {{ page.body }} - {% if page.category_options.all %} <div class="grid grid--two grid--small-gap"> {% regroup page.category_options by category as categories %} -- GitLab