Skip to content

Commit

Permalink
Merge branch 'release' into 'master'
Browse files Browse the repository at this point in the history
Release 71.00

See merge request buckinghamshire-council/bc!692
  • Loading branch information
engineervix committed Jun 3, 2024
2 parents dd5eb98 + 958aabf commit ce12c67
Show file tree
Hide file tree
Showing 32 changed files with 264 additions and 219 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ poetry:
image: python:3.8-bullseye
stage: build
variables:
POETRY_VERSION: 1.7.1
POETRY_VERSION: 1.8.2
script:
- pip install poetry==$POETRY_VERSION
- python -m venv venv
Expand Down
6 changes: 0 additions & 6 deletions .isort.cfg

This file was deleted.

13 changes: 9 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
repos:
- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.15
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
language_version: python3
- repo: https://github.com/pycqa/flake8
rev: 3.8.4
rev: 5.0.4
hooks:
- id: flake8
language_version: python3
- repo: https://github.com/python/black
rev: 22.3.0
rev: 24.4.2
hooks:
- id: black
language_version: python3
Expand Down Expand Up @@ -53,3 +53,8 @@ repos:
package-lock.json|
poetry.lock
)$
- repo: https://github.com/adamchainz/django-upgrade
rev: '1.16.0' # replace with latest tag on GitHub
hooks:
- id: django-upgrade
args: [--target-version, '4.2'] # Replace with Django version
4 changes: 2 additions & 2 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"files": null,
"lines": null
},
"generated_at": "2023-01-31T09:59:38Z",
"generated_at": "2024-05-01T13:57:21Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down Expand Up @@ -50,7 +50,7 @@
{
"hashed_secret": "7f6ed39d1d3ed4e0f4880ad4500cb47a0fd025ed",
"is_verified": false,
"line_number": 143,
"line_number": 144,
"type": "Secret Keyword"
}
],
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Release History

## Unreleased

Compare: <https://git.torchbox.com/buckinghamshire-council/bc/compare/70.01...HEAD>

## 71.00 (2024-06-03)

[Wagtail 6.0](https://docs.wagtail.org/en/latest/releases/6.0.html) upgrade

Compare: <https://git.torchbox.com/buckinghamshire-council/bc/compare/70.01...71.00>

## 70.01 (2024-04-03)

- Update `flake8` to version 3.8.4 for Python 3.8 compatibility
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ARG POETRY_HOME=/opt/poetry
ARG POETRY_INSTALL_ARGS="--no-dev"

# IMPORTANT: Remember to review both of these when upgrading
ARG POETRY_VERSION=1.7.1
ARG POETRY_VERSION=1.8.2

# Install dependencies in a virtualenv
ENV VIRTUAL_ENV=/venv
Expand Down
4 changes: 2 additions & 2 deletions bc/blogs/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ class BlogAboutPage(BasePage):
blank=True,
)

body = StreamField(StoryBlock(), use_json_field=True)
body = StreamField(StoryBlock())

content_panels = BasePage.content_panels + [
FieldPanel("intro_text"),
Expand Down Expand Up @@ -372,7 +372,7 @@ class BlogPostPage(BasePage):
author = models.TextField()
date_published = models.DateField()

body = StreamField(StoryBlock(), use_json_field=True)
body = StreamField(StoryBlock())

content_panels = BasePage.content_panels + [
FieldPanel("categories", widget=CheckboxSelectMultiple),
Expand Down
3 changes: 1 addition & 2 deletions bc/campaigns/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ class CampaignPage(BasePage):
on_delete=models.SET_NULL,
)
body = fields.StreamField(
CampaignPageStoryBlock(block_counts={"heading": {"min_num": 3, "max_num": 3}}),
use_json_field=True,
CampaignPageStoryBlock(block_counts={"heading": {"min_num": 3, "max_num": 3}})
)

content_panels = BasePage.content_panels + [
Expand Down
9 changes: 4 additions & 5 deletions bc/cases/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ class ApteanRespondCaseFormPage(RoutablePageMixin, BasePage):
form = models.CharField(max_length=255, choices=APTEAN_FORM_CHOICES)

body = StreamField(
CaseFormStoryBlock(block_counts={"form_link_button": {"min_num": 1}}),
use_json_field=True,
CaseFormStoryBlock(block_counts={"form_link_button": {"min_num": 1}})
)

introduction = RichTextField(
Expand Down Expand Up @@ -172,9 +171,9 @@ def form_route(self, request, *args, **kwargs):
form, case_reference = self.process_form_submission(form)
if form.is_valid(): # still
# store the case_reference in the session for the thank you page
request.session[
self.get_case_reference_session_key()
] = case_reference
request.session[self.get_case_reference_session_key()] = (
case_reference
)
request.session[self.get_landing_page_session_key()] = True
return redirect(self.url, permanent=False)
else:
Expand Down
2 changes: 1 addition & 1 deletion bc/events/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class EventPage(BasePage):
country = models.CharField(_("Country"), blank=True, max_length=255)

introduction = models.TextField(blank=True)
body = StreamField(StoryBlock(), use_json_field=True)
body = StreamField(StoryBlock())

search_fields = BasePage.search_fields + [
index.SearchField("introduction"),
Expand Down
4 changes: 2 additions & 2 deletions bc/feedback/wagtail_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def register_usefulness_feedback_report_menu_item():
return menu.MenuItem(
UsefulnessFeedbackReportView.title,
urls.reverse("usefuleness_feedback_report"),
classname="icon icon-" + UsefulnessFeedbackReportView.header_icon,
icon_name=UsefulnessFeedbackReportView.header_icon,
order=300,
)

Expand All @@ -32,7 +32,7 @@ def register_feedback_comment_report_menu_item():
return menu.MenuItem(
FeedbackCommentReportView.title,
urls.reverse("feedback_comment_report"),
classname="icon icon-" + FeedbackCommentReportView.header_icon,
icon_name=FeedbackCommentReportView.header_icon,
order=400,
)

Expand Down
4 changes: 2 additions & 2 deletions bc/inlineindex/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class InlineIndex(InlineIndexMixin, BasePage):
)
intro_text = models.TextField(blank=True)

body = StreamField(StoryBlock(), use_json_field=True)
body = StreamField(StoryBlock())

is_inline_index = True
is_inline_index_child = False
Expand Down Expand Up @@ -158,7 +158,7 @@ def content_title(self):
class InlineIndexChild(InlineIndexMixin, BasePage):
template = InlineIndex.template

body = StreamField(StoryBlock(), use_json_field=True)
body = StreamField(StoryBlock())

is_inline_index = False
is_inline_index_child = True
Expand Down
4 changes: 1 addition & 3 deletions bc/location/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class LocationIndexPage(BasePage):
subpage_types = ["location.LocationPage"]

body = RichTextField(editor="with_h2")
additional_info = StreamField(StoryBlock(), use_json_field=True, blank=True)
additional_info = StreamField(StoryBlock(), blank=True)

content_panels = BasePage.content_panels + [
FieldPanel("body"),
Expand Down Expand Up @@ -65,7 +65,6 @@ class LocationPage(BasePage):

additional_info = StreamField(
StoryBlock(),
use_json_field=True,
blank=True,
help_text=(
"Additional information about this location like opening times, facilities, etc. "
Expand Down Expand Up @@ -96,7 +95,6 @@ class LocationPage(BasePage):

body = StreamField(
StoryBlock(),
use_json_field=True,
help_text="Generic body content. This will appear after the map in the template.",
)

Expand Down
4 changes: 2 additions & 2 deletions bc/longform/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Meta:
max_length=255,
)
intro_text = models.TextField(blank=True)
body = StreamField(LongformStoryBlock(), use_json_field=True)
body = StreamField(LongformStoryBlock())

document = models.ForeignKey(
settings.WAGTAILDOCS_DOCUMENT_MODEL,
Expand Down Expand Up @@ -105,7 +105,7 @@ class LongformChapterPage(BasePage):
class Meta:
verbose_name = "Long-form content chapter page"

body = StreamField(LongformStoryBlock(), use_json_field=True)
body = StreamField(LongformStoryBlock())

search_fields = BasePage.search_fields + [index.SearchField("body")]

Expand Down
2 changes: 0 additions & 2 deletions bc/navigation/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,11 @@ class NavigationSettings(BaseSiteSetting, ClusterableModel):
max_num=3,
),
blank=True,
use_json_field=True,
)
footer_links = StreamField(
[("link", LinkBlock())],
blank=True,
help_text="Single list of elements at the base of the page.",
use_json_field=True,
)

panels = [
Expand Down
2 changes: 1 addition & 1 deletion bc/news/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class NewsPage(BasePage):
"news item appears to have been published.",
)
introduction = models.TextField(blank=True)
body = StreamField(StoryBlock(), use_json_field=True)
body = StreamField(StoryBlock())

search_fields = BasePage.search_fields + [
index.SearchField("introduction"),
Expand Down
2 changes: 1 addition & 1 deletion bc/people/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class PersonPage(BasePage):
job_title = models.CharField(max_length=255)
introduction = models.TextField(blank=True)
website = models.URLField(blank=True, max_length=255)
biography = StreamField(StoryBlock(), blank=True, use_json_field=True)
biography = StreamField(StoryBlock(), blank=True)
email = models.EmailField(blank=True)

content_panels = BasePage.content_panels + [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{# Use with include, e.g. `{% include "patterns/atoms/icons/icon.html" with name="mybutton" classname="icon--stroke button__icon" %}` #}
<svg
class="icon icon--{{ name }}{% if classname %} {{ classname }}{% endif %}"
class="icon icon-{{ name }}{% if classname %} {{ classname }}{% endif %}"
{% if width %} width="{{ width }}"{% endif %}
{% if height %} height="{{ height }}"{% endif %}
{% if viewBox %} viewBox="{{ viewBox }}"{% endif %}
Expand Down
9 changes: 4 additions & 5 deletions bc/recruitment/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def callback_talentlinkjob_delete_attachments_and_logo(
@register_snippet
class AwardsSnippet(models.Model):
heading = models.CharField(max_length=255)
awards = StreamField([("award", AwardBlock())], use_json_field=True)
awards = StreamField([("award", AwardBlock())])

panels = [
FieldPanel("heading"),
Expand All @@ -368,8 +368,8 @@ class JobPlatformsMediaSnippet(models.Model):
title = models.CharField(max_length=255)
description = models.CharField(max_length=255)
cta = models.CharField(max_length=255, verbose_name="Call to action text")
job_platforms = StreamField([("platform", JobPlatformBlock())], use_json_field=True)
media_embed = StreamField(MediaBlock(), max_num=1, use_json_field=True)
job_platforms = StreamField([("platform", JobPlatformBlock())])
media_embed = StreamField(MediaBlock(), max_num=1)

def __str__(self):
return self.title
Expand Down Expand Up @@ -439,7 +439,6 @@ class RecruitmentHomePage(RoutablePageMixin, BasePage):
required=False,
),
blank=True,
use_json_field=True,
)
related_recruitment_index_page = models.ForeignKey(
"recruitment.RecruitmentIndexPage",
Expand Down Expand Up @@ -587,7 +586,7 @@ class RecruitmentIndexPage(BasePage):
max_length=255,
blank=True,
)
body = StreamField(StoryBlock(required=False), blank=True, use_json_field=True)
body = StreamField(StoryBlock(required=False), blank=True)

content_panels = BasePage.content_panels + [
MultiFieldPanel(
Expand Down
2 changes: 1 addition & 1 deletion bc/search/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ class SearchConfig(AppConfig):
name = "bc.search"

def ready(self):
import bc.search.signal_handlers # noqa
import bc.search.query # noqa
import bc.search.signal_handlers # noqa
58 changes: 0 additions & 58 deletions bc/search/elasticsearch5.py

This file was deleted.

Loading

0 comments on commit ce12c67

Please sign in to comment.