Skip to content

Commit 965fcfc

Browse files
authored
Add Wagtail 6 support (#67)
Update to wagtail 6, run latest version of black, remove deprecation warning in package
1 parent 89aff1b commit 965fcfc

File tree

13 files changed

+23
-4
lines changed

13 files changed

+23
-4
lines changed

azure-pipelines.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ stages:
4242
py3.11_wag5:
4343
PYTHON_VERSION: '3.11'
4444
WAGTAIL: '5.*'
45+
py3.12_wag6:
46+
PYTHON_VERSION: "3.12"
47+
WAGTAIL: '6.*'
4548

4649
steps:
4750
- task: UsePythonVersion@0

ci/compare-codecov.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ foreach ($build in $mainBuildJson.value) {
5555

5656
# Retrieve code coverage for this build ID.
5757
$mainCoverageJson = (
58-
Invoke-WebRequest "$ApiBase/_apis/test/codecoverage?buildId=$mainLatestId&api-version=5.1-preview.1"
58+
Invoke-WebRequest "$ApiBase/_apis/test/codecoverage?buildId=$mainLatestId&flags=7&api-version=7.1-preview.1"
5959
).Content | ConvertFrom-Json
6060
foreach ($cov in $mainCoverageJson.coverageData.coverageStats) {
6161
if ($cov.label -eq "Lines") {

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import sys
1616
sys.path.insert(0, os.path.abspath('.'))
1717
"""
18+
1819
import datetime
1920

2021
from wagtailcache import __shortversion__

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
license="BSD license",
2020
include_package_data=True,
2121
packages=find_packages(),
22-
install_requires=["wagtail>=3.0,<6"],
22+
install_requires=["wagtail>=3.0,<7"],
2323
classifiers=[
2424
"Intended Audience :: Developers",
2525
"License :: OSI Approved :: BSD License",

testproject/testproject/settings.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
For the full list of settings and their values, see
1010
https://docs.djangoproject.com/en/2.2/ref/settings/
1111
"""
12+
1213
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
1314
import os
1415

@@ -99,7 +100,14 @@
99100
"django.contrib.staticfiles.finders.AppDirectoriesFinder",
100101
]
101102

102-
STATICFILES_STORAGE = "django.contrib.staticfiles.storage.StaticFilesStorage"
103+
STORAGES = {
104+
"default": {
105+
"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage"
106+
},
107+
"staticfiles": {
108+
"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage"
109+
},
110+
}
103111

104112
STATIC_ROOT = os.path.join(BASE_DIR, "static")
105113
STATIC_URL = "/static/"

testproject/testproject/wsgi.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
For more information on this file, see
77
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
88
"""
9+
910
import os
1011

1112
from django.core.wsgi import get_wsgi_application

wagtailcache/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
release = ["2", "3", "0"]
1+
release = ["2", "4", "0"]
22
__version__ = "{0}.{1}.{2}".format(release[0], release[1], release[2])
33
__shortversion__ = "{0}.{1}".format(release[0], release[1])

wagtailcache/cache.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Functionality to set, serve from, and clear the cache.
33
"""
4+
45
import re
56
from enum import Enum
67
from functools import wraps

wagtailcache/management/commands/clear_wagtail_cache.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""CLI tool to clear wagtailcache."""
2+
23
from django.core.management.base import BaseCommand
34

45
from wagtailcache.cache import clear_cache

wagtailcache/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Default django settings for wagtail-cache.
33
"""
4+
45
from typing import Text
56

67
from django.conf import settings

0 commit comments

Comments
 (0)