Skip to content

Commit

Permalink
Amend form model to name imagefield image. Workson wagtail-nest#15.
Browse files Browse the repository at this point in the history
  • Loading branch information
hminnovation committed Feb 27, 2017
1 parent a870eb5 commit 600bfc4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
20 changes: 20 additions & 0 deletions bakerydemo/base/migrations/0013_auto_20170227_2216.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-27 22:16
from __future__ import unicode_literals

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('base', '0012_auto_20170222_0756'),
]

operations = [
migrations.RenameField(
model_name='formpage',
old_name='header_image',
new_name='image',
),
]
4 changes: 2 additions & 2 deletions bakerydemo/base/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ class FormField(AbstractFormField):


class FormPage(AbstractEmailForm):
header_image = models.ForeignKey(
image = models.ForeignKey(
'wagtailimages.Image',
null=True,
blank=True,
Expand All @@ -232,7 +232,7 @@ class FormPage(AbstractEmailForm):
body = StreamField(BaseStreamBlock())
thank_you_text = RichTextField(blank=True)
content_panels = AbstractEmailForm.content_panels + [
ImageChooserPanel('header_image'),
ImageChooserPanel('image'),
StreamFieldPanel('body'),
InlinePanel('form_fields', label="Form fields"),
FieldPanel('thank_you_text', classname="full"),
Expand Down

0 comments on commit 600bfc4

Please sign in to comment.