Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wagtail 6.1 #797

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,6 @@ jobs:
run: |
coverage run testmanage.py test
- name: 'Upload coverage to Codecov'
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Support for Wagtail 6.1

### Removed

- Support for Django < 4.2

## [1.9] - 2024-04-03

### Added
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ We'll be at Wagtail Space US this year! The Call for Participation and Registrat
Wagtail Localize requires the following:

- Python (3.8, 3.9, 3.10, 3.11)
- Django (3.2, 4.2, 5.0)
- Wagtail (5.2, 6.0) with [internationalisation enabled](https://docs.wagtail.org/en/stable/advanced_topics/i18n.html#configuration)
- Django (4.2, 5.0)
- Wagtail (5.2, 6.0, 6.1) with [internationalisation enabled](https://docs.wagtail.org/en/stable/advanced_topics/i18n.html#configuration)
- [wagtail-modeladmin](https://pypi.org/project/wagtail-modeladmin/) if `using wagtail_localize.modeladmin` and Wagtail >= 5.2

## Installation
Expand Down
2 changes: 1 addition & 1 deletion docs/how-to/modeladmin.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ INSTALLED_APPS = [
When registering your custom models you can use the supplied `TranslatableModelAdmin` in place of Wagtail's `ModelAdmin` class.

```python
from wagtail.contrib.modeladmin.options import modeladmin_register
from wagtail_localize.modeladmin.options import TranslatableModelAdmin
from wagtail_modeladmin.options import modeladmin_register

from .models import MyTranslatableModel

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Framework :: Wagtail",
"Framework :: Wagtail :: 4",
"Framework :: Wagtail :: 5"
"Framework :: Wagtail :: 5",
"Framework :: Wagtail :: 6"
]
dynamic = ["version"]
requires-python = ">=3.8"
dependencies = [
"Django>=3.2,<5.1",
"Wagtail>=5.2",
"Django>=4.2,<5.1",
"Wagtail>=5.2,<6.2",
"polib>=1.1,<2.0",
"typing_extensions>=4.0"
]
Expand Down
15 changes: 7 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
min_version = 4.0

envlist =
python3.10-django3.2-wagtail5.2-postgres15
python{3.8,3.9,3.10,3.11,3.12}-django{4.2}-wagtail{5.2,6.0}-postgres15
python{3.10,3.11,3.12}-django{5.0}-wagtail{5.2,6.0}-postgres15
python{3.8,3.9,3.10,3.11,3.12}-django4.2-wagtail{5.2,6.0,6.1}-postgres15
python{3.10,3.11,3.12}-django5.0-wagtail{5.2,6.0,6.1}-postgres15
# note: we're running a subset of the test with sqlite
python3.10-django3.2-wagtail5.2-sqlite
python3.11-django4.2-wagtail{5.2,6.0}-sqlite
python3.12-django5.0-wagtail{5.2,6.0}-sqlite
python3.10-django4.2-wagtail5.2-sqlite
python3.11-django4.2-wagtail{5.2,6.0,6.1}-sqlite
python3.12-django5.0-wagtail{5.2,6.0,6.1}-sqlite

[gh-actions]
python =
Expand Down Expand Up @@ -39,12 +38,12 @@ setenv =
extras = testing

deps =
django3.2: Django>=3.2,<3.3
django4.2: Django>=4.2,<5.0
django5.0: Django>=5.0,<5.1

wagtail5.2: wagtail>=5.2.2,<5.3
wagtail6.0: wagtail>=6.0,<6.1
wagtail6.1: wagtail>=6.1,<6.2
wagtailmain: git+https://github.com/wagtail/wagtail.git

postgres: psycopg2>=2.9
Expand Down Expand Up @@ -94,7 +93,7 @@ basepython = python3.11

# always generate with the min supported versions
deps =
Django>=3.2,<3.3
Django>=4.2,<5.0
wagtail>=5.2,<6.0

commands =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
{% extends "wagtailadmin/generic/confirm_delete.html" %}
{% load i18n %}

{% block content %}
{% include "wagtailadmin/shared/header.html" with title=view.page_title subtitle=view.get_page_subtitle icon=view.header_icon %}

<div class="nice-padding">
{% if can_delete %}
<p>{{ view.confirmation_message }}</p>

<form action="{{ view.get_delete_url }}" method="POST">
{% csrf_token %}
<input type="submit" value="{% trans 'Yes, delete' %}" class="button serious" />
<a href="{% url 'wagtaillocales:edit' locale.id %}" class="button button-secondary">{% trans "Back" %}</a>
</form>
{% else %}
<p>{{ view.cannot_delete_message }}</p>
{% block main_content %}
{% if can_delete %}
<p>{{ view.confirmation_message }}</p>

<form action="{{ view.get_delete_url }}" method="POST">
{% csrf_token %}
<input type="submit" value="{% trans 'Yes, delete' %}" class="button serious" />
<a href="{% url 'wagtaillocales:edit' locale.id %}" class="button button-secondary">{% trans "Back" %}</a>
{% endif %}
</div>
</form>
{% else %}
<p>{{ view.cannot_delete_message }}</p>

<a href="{% url 'wagtaillocales:edit' locale.id %}" class="button button-secondary">{% trans "Back" %}</a>
{% endif %}
{% endblock %}
4 changes: 2 additions & 2 deletions wagtail_localize/tests/test_edit_translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
)
from rest_framework.settings import api_settings
from rest_framework.test import APITestCase
from wagtail.admin.panels import FieldPanel
from wagtail.admin.panels import FieldPanel, TitleFieldPanel
from wagtail.blocks import StreamValue
from wagtail.documents.models import Document
from wagtail.images.models import Image
Expand Down Expand Up @@ -1506,7 +1506,7 @@ def test_edit_page_translation_with_missing_panel(self):
# Hide fields that don't have a panel to edit them with
previous_panels = TestPage.content_panels
TestPage.content_panels = [
FieldPanel("title"),
TitleFieldPanel("title"),
FieldPanel("test_textfield"),
]
TestPage.get_edit_handler.cache_clear()
Expand Down
Loading