diff --git a/cms/migrations/0013_programpage_thumbnail_image.py b/cms/migrations/0013_programpage_thumbnail_image.py new file mode 100644 index 0000000000..64732bf253 --- /dev/null +++ b/cms/migrations/0013_programpage_thumbnail_image.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.7 on 2016-06-22 15:41 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('wagtailimages', '0012_copy_image_permissions_to_collections'), + ('cms', '0012_programpage_external_program_page_url'), + ] + + operations = [ + migrations.AddField( + model_name='programpage', + name='thumbnail_image', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.Image'), + ), + ] diff --git a/cms/models.py b/cms/models.py index e61f3760c7..3352c2aaf3 100644 --- a/cms/models.py +++ b/cms/models.py @@ -78,9 +78,18 @@ class ProgramPage(Page): contact_us = RichTextField(blank=True) title_over_image = RichTextField(blank=True) + thumbnail_image = models.ForeignKey( + Image, + null=True, + blank=True, + on_delete=models.SET_NULL, + related_name='+' + ) + content_panels = Page.content_panels + [ FieldPanel('description', classname="full"), FieldPanel('program'), + FieldPanel('thumbnail_image'), FieldPanel('external_program_page_url'), FieldPanel('background_image'), FieldPanel('contact_us'), diff --git a/cms/templates/cms/home_page.html b/cms/templates/cms/home_page.html index 81ceaf6d6d..9dbbead591 100644 --- a/cms/templates/cms/home_page.html +++ b/cms/templates/cms/home_page.html @@ -79,7 +79,13 @@