Skip to content

Commit

Permalink
feat: add wagtail 6 support
Browse files Browse the repository at this point in the history
  • Loading branch information
csalom committed May 22, 2024
1 parent 9a20df4 commit 00479a3
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@
* Yed Podtrzitko
* Francisco Fernández
* Pep Lluís Miró
* Wesley van Lee
* Marco Badan
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Changelog

Unreleased
----------
* Add Wagtail 6.1 support. Drop Wagtail <=5.2 support.


2.0.0 (2023-07-04)
------------------
Expand Down
1 change: 1 addition & 0 deletions puput/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"wagtail.sites",
"wagtail.contrib.redirects",
"wagtail.contrib.forms",
"wagtail.contrib.search_promotions",
"wagtail.contrib.sitemaps",
"wagtail.contrib.routable_page",
"wagtail",
Expand Down
7 changes: 6 additions & 1 deletion puput/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@

from wagtail.contrib.routable_page.models import RoutablePageMixin, route
from wagtail.models import Page
from wagtail.search.models import Query
import wagtail
if wagtail.VERSION[:2] < (6, 0):
from wagtail.search.models import Query
else:
# https://docs.wagtail.org/en/stable/releases/6.0.html#query-model-moved-to-wagtail-contrib-search-promotions
from wagtail.contrib.search_promotions.models import Query

from .utils import get_object_or_None

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def get_metadata(package, field):
description='A Django blog app implemented in Wagtail.',
long_description=codecs.open(os.path.join(os.path.dirname(__file__), 'README.rst'), encoding='utf-8').read(),
install_requires=[
'wagtail>=5.2',
'wagtail>=5.2,<7.0',
'django-el-pagination==4.0.0',
'django-taggit>=3.1.0,<4.1',
'wagtail-markdown==0.11.1'
Expand Down

0 comments on commit 00479a3

Please sign in to comment.