Skip to content

Commit

Permalink
Merge pull request #65 from springload/chore/upgrade-wagtail
Browse files Browse the repository at this point in the history
Upgrade Wagtail
  • Loading branch information
loicteixeira committed Mar 13, 2017
2 parents 923e070 + c30f10d commit 84cb0bc
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 15 deletions.
2 changes: 1 addition & 1 deletion core/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class SubmitFormPage(WagtailCaptchaEmailForm if has_recaptcha() else AbstractEma
"""
Form page, inherits from WagtailCaptchaEmailForm if available, otherwise fallback to AbstractEmailForm
"""
search_fields = ()
search_fields = []
body = RichTextField(blank=True, help_text='Edit the content you want to see before the form.')
thank_you_text = RichTextField(blank=True, help_text='Set the message users will see after submitting the form.')

Expand Down
29 changes: 29 additions & 0 deletions core/migrations/0006_wagtail_1_6_upgrade.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('core', '0005_auto_20161004_1431'),
]

operations = [
migrations.AlterField(
model_name='submitformfield',
name='choices',
field=models.TextField(help_text='Comma separated list of choices. Only applicable in checkboxes, radio and dropdown.', verbose_name='choices', blank=True),
),
migrations.AlterField(
model_name='submitformpage',
name='to_address',
field=models.CharField(help_text='Optional - form submissions will be emailed to these addresses. Separate multiple addresses by comma.', max_length=255, verbose_name='to address', blank=True),
),
migrations.AlterField(
model_name='wagtailcompanypage',
name='company_url',
field=models.URLField(help_text=b'Paste the URL of your site, something like "https://www.springload.co.nz"', null=True, blank=True),
),
]
14 changes: 7 additions & 7 deletions core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class HomePage(Page, IndexPage):
on_delete=models.SET_NULL,
related_name='+'
)
search_fields = ()
search_fields = []

body = RichTextField(blank=True)

Expand Down Expand Up @@ -130,7 +130,7 @@ class CompanyIndex(Page, IndexPage):
HomePage class, inheriting from wagtailcore.Page straight away
"""
subpage_types = ['core.WagtailCompanyPage']
search_fields = ()
search_fields = []
body = RichTextField(null=True, blank=True)
show_map = models.BooleanField(default=False, help_text='Show map of companies around the world.')

Expand Down Expand Up @@ -191,7 +191,7 @@ class WagtailPage(Page):
)
body = RichTextField(blank=True)
tags = ClusterTaggableManager(through=PageTag, blank=True)
search_fields = ()
search_fields = []

@property
def parent(self):
Expand Down Expand Up @@ -261,10 +261,10 @@ class WagtailCompanyPage(WagtailPage):
related_name='+'
)

search_fields = Page.search_fields + ( # Inherit search_fields from Page
search_fields = Page.search_fields + [
index.SearchField('company_url', boost=1),
index.SearchField('body_text', boost=1)
)
]

@property
def lat(self):
Expand Down Expand Up @@ -380,10 +380,10 @@ class WagtailSitePage(WagtailPage):
help_text='Paste the URL of your site, something like "http://www.springload.co.nz"',
)

search_fields = Page.search_fields + ( # Inherit search_fields from Page
search_fields = Page.search_fields + [
index.SearchField('site_url'),
index.SearchField('body_text')
)
]

@property
def og_image(self):
Expand Down
1 change: 0 additions & 1 deletion include/python2.7

This file was deleted.

1 change: 0 additions & 1 deletion madewithwagtail/settings/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
from .dev import *
2 changes: 1 addition & 1 deletion manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sys

if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "madewithwagtail.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "madewithwagtail.settings.dev")

from django.core.management import execute_from_command_line

Expand Down
6 changes: 2 additions & 4 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
Django==1.8.15
Django==1.8.17
psycopg2==2.6.1
django-compressor==2.0
django-modelcluster==2.0
django-taggit==0.18.1
wagtail==1.4.6
wagtail==1.9
beautifulsoup4>=4.3.2
wagtail-django-recaptcha==0.2
wagtailgmaps==0.2.5

0 comments on commit 84cb0bc

Please sign in to comment.