Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
c2a2ca2
Initial version bumps
nickmoreton Feb 8, 2023
ac90593
Drop wagtail version <4.1 support
nickmoreton Feb 8, 2023
c248d7b
Correct the wagtail import
nickmoreton Feb 9, 2023
74e8dc0
Update documentation screen shots
nickmoreton Jun 8, 2023
893985f
Adds new versions for testing
nickmoreton Jun 8, 2023
f7e01e8
Add ci testing
nickmoreton Jun 8, 2023
8282a94
Cant test python 311 with django 32 or 41
nickmoreton Jun 9, 2023
cc4dc30
Add more testing for django versions with py-311
nickmoreton Jul 25, 2023
32bb7e2
Merge pull request #3 from torchbox-forks/wagtail-50
nickmoreton Jul 25, 2023
ae4e1af
Add a changelog
nickmoreton Jul 25, 2023
290b57e
update release notes
nickmoreton Jul 25, 2023
0960fdf
Merge pull request #4 from torchbox-forks/release-prep
nickmoreton Jul 25, 2023
13a05c1
Update tox.ini to include tests for Wagtail 5.1
katdom13 Oct 4, 2023
bfac13c
Wagtail 5.1 upgrade consideration: wagtail.contrib.modeladmin is depr…
katdom13 Oct 5, 2023
3ec3119
Remove usage of USE_L10N in settings.py
katdom13 Oct 5, 2023
d54710f
Add an entry to the Unreleased section on CHANGELOG.md
katdom13 Oct 5, 2023
fe74326
Move wagtail_modeladmin to extras_require
katdom13 Oct 6, 2023
0294053
Update documentation to recommend installing wagtail_modeladmin when …
katdom13 Oct 6, 2023
aee32da
Merge pull request #5 from torchbox-forks/support/wagtail-51
katdom13 Oct 16, 2023
a918cbb
Update changelog with new version
katdom13 Oct 16, 2023
4dc2b30
Merge pull request #7 from torchbox-forks/torchbox-forks/release-prep
katdom13 Oct 16, 2023
e7ca447
Add Wagtail 5.2 and Python 3.12 to test matrices
katdom13 Nov 10, 2023
1838c58
Remove Python 3.12 tests until the next upgrades for Wagtail LTS
katdom13 Nov 20, 2023
ab24a91
Merge pull request #8 from torchbox-forks/support/wagtail-52
katdom13 Nov 20, 2023
e885f23
Update test matrix, Add python 3.12 to test.yml
katdom13 Mar 5, 2024
b786636
Update Wagtail, wagtail-modeladmin version lowerbound, Update classif…
katdom13 Mar 5, 2024
16c7d56
Update tox environments on Makefile
katdom13 Mar 5, 2024
2d02a90
Bump Github workflow actions, Add python 3.12 to python-version on te…
katdom13 Mar 5, 2024
52db121
Apply Django upgrade considerations
katdom13 Mar 5, 2024
97e4581
Remove references to deprecated wagtail.contrib.modeladmin
katdom13 Mar 5, 2024
410e3d5
Update CHANGELOG.md
katdom13 Mar 5, 2024
5ee7920
Put fallback for deprecated distutils module for Python 3.12
katdom13 Mar 6, 2024
214537c
Add setuptools to test-requirements needed for Python 3.12
katdom13 Mar 6, 2024
d5a7d6f
Add wagtail-modeladmin to requirements
katdom13 Mar 7, 2024
b5df7bf
Merge pull request #9 from torchbox-forks/support/wagtail-60
katdom13 Mar 8, 2024
9d05a63
Update test matrix: Add Wagtail 6.1, Drop Django 3.2
katdom13 May 24, 2024
c6bddaf
Update classifiers
katdom13 May 24, 2024
29d2027
Update change logs
katdom13 May 24, 2024
0c17d1e
Add tox-61 to Makefile
katdom13 May 24, 2024
f1cefed
Update test requirements
katdom13 May 24, 2024
505a04d
Merge pull request #10 from torchbox-forks/support/wagtail61
katdom13 Jun 14, 2024
e0e5a63
Drop python 3.8 testing
nickmoreton Mar 24, 2025
974b0f5
Six is a required dependency
nickmoreton Mar 24, 2025
2c13ca6
Adjust testing matrix
nickmoreton Mar 24, 2025
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
39 changes: 39 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Tests

on:
pull_request:
branches: [master]
push:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
strategy:
max-parallel: 2
matrix:
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

- name: Install dependencies
id: install-dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions

- name: Test with tox
id: test-with-tox
run: |
tox
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ __pycache__
.DS_Store

/test_robots.db
venv
.venv
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Changelog

## Unreleased

- Drop testing support for Wagtail 6.0 & 6.1
- Add testing support for Wagtail 6.3 & 6.4
- Add testing support for Django 5.1
- Drop support for Python 3.8
- Add Wagtail 6 to test matrices
- Drop support for Django < 4.2

## 1.1.0+tbx (2024-03-05)

- Add Wagtail 5.2 to test matrices

## 1.0.1 (2023-10-16)

- Add upgrade considerations for [Wagtail 5.1](https://github.com/torchbox-forks/wagtail-robots/pull/5)

## 1.0.0 (2023-07-25)

- Integrate [wagtail upgrades](https://github.com/unexceptable/wagtail-robots/pull/20)
16 changes: 6 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,11 @@ user:
migrate:
@python testmanage.py migrate

tox-215:
tox -e py38-dj32-wt215
tox-52:
tox -e py38-dj42-wt52

tox-216:
tox -e py38-dj32-wt216
tox-60:
tox -e py38-dj42-wt60

tox-3:
tox -e py38-dj40-wt30

tox-4:
tox -e py38-dj40-wt40
tox -e py38-dj41-wt41
tox-61:
tox -e py38-dj42-wt61
9 changes: 8 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,14 @@ Or get the source from the application site at::

Then follow these steps:

1. Add ``'wagtail.contrib.modeladmin'`` and ``'robots'`` to your INSTALLED_APPS_ setting.
1. Add ``robots`` and ``modeladmin`` to the ``INSTALLED_APPS`` setting in your project settings::

INSTALLED_APPS = [
...
'wagtail_modeladmin',
'robots',
]

2. Run the ``migrate`` management command

You may want to additionally setup the `Wagtail sitemap generator`_.
Expand Down
Binary file modified docs/source/static/1_in_menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/static/2_index.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/static/3_create_edit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/static/4_create_edit_condensed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/static/5_index_rule.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 4 additions & 14 deletions robots/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import django
from six import u

from django.db import models
from django.utils.text import get_text_list
Expand All @@ -7,20 +7,10 @@
from modelcluster.models import ClusterableModel
from modelcluster.fields import ParentalKey

from robots.panels import WrappedInlinepanel
from wagtail.admin.panels import FieldPanel
from wagtail.models import Site

from wagtail import VERSION as WAGTAIL_VERSION
if WAGTAIL_VERSION >= (3, 0):
from wagtail.models import Site
from wagtail.admin.panels import FieldPanel
else:
from wagtail.core.models import Site
from wagtail.admin.edit_handlers import FieldPanel

if django.VERSION >= (3, 0):
from six import u
else:
from django.utils.six import u
from robots.panels import WrappedInlinepanel


class BaseUrl(models.Model):
Expand Down
24 changes: 9 additions & 15 deletions robots/panels.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
from distutils.version import LooseVersion
try:
from distutils.version import LooseVersion
except ImportError:
from setuptools.distutils.version import LooseVersion

from django.conf import settings

from wagtail import VERSION as WAGTAIL_VERSION
if WAGTAIL_VERSION >= (3, 0):
from wagtail.admin.panels import InlinePanel
else:
from wagtail.admin.edit_handlers import InlinePanel
from wagtail.admin.panels import InlinePanel


def WrappedInlinepanel(relation_name, heading='', label='',
Expand All @@ -26,15 +25,10 @@ def WrappedInlinepanel(relation_name, heading='', label='',
'new_card_header_text': new_card_header_text,
}
else:
if WAGTAIL_VERSION >= (2, 0):
defaults = {
'heading': heading,
'label': label,
}
else:
defaults = {
'label': label,
}
defaults = {
'heading': heading,
'label': label,
}

defaults.update(kwargs)
return klass(relation_name, **defaults)
1 change: 0 additions & 1 deletion robots/test/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
default_app_config = "robots.test.apps.RobotsTestAppConfig"
8 changes: 4 additions & 4 deletions robots/test/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

import os

from wagtail import VERSION as WAGTAIL_VERSION

# Build paths inside the project like this: os.path.join(PROJECT_DIR, ...)
PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
BASE_DIR = os.path.dirname(PROJECT_DIR)
Expand Down Expand Up @@ -42,11 +44,11 @@
"wagtail.search",
"wagtail.admin",
"wagtail.api.v2",
"wagtail.contrib.modeladmin",
"wagtail_modeladmin",
"wagtail.contrib.routable_page",
"wagtail.contrib.styleguide",
"wagtail.sites",
"wagtail.core",
"wagtail",
"taggit",
"rest_framework",
"django.contrib.admin",
Expand Down Expand Up @@ -125,8 +127,6 @@

USE_I18N = True

USE_L10N = True

USE_TZ = True


Expand Down
2 changes: 1 addition & 1 deletion robots/test/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from wagtail.admin import urls as wagtailadmin_urls
from wagtail.documents import urls as wagtaildocs_urls
from wagtail.core import urls as wagtail_urls
from wagtail import urls as wagtail_urls

urlpatterns = [
path("django-admin/", admin.site.urls),
Expand Down
18 changes: 4 additions & 14 deletions robots/views.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
import django
from django.db.models import Q
from django.views.decorators.cache import cache_page
from django.views.generic import ListView
from django.urls import NoReverseMatch, reverse

from wagtail.contrib.sitemaps.views import sitemap
from wagtail.models import Site

from robots import settings
from robots.models import Rule

if django.VERSION[:2] >= (2, 0):
from django.urls import NoReverseMatch, reverse
else:
from django.core.urlresolvers import NoReverseMatch, reverse

from wagtail import VERSION as WAGTAIL_VERSION # noqa
if WAGTAIL_VERSION >= (3, 0):
from wagtail.models import Site
else:
from wagtail.core.models import Site

from wagtail.contrib.sitemaps.views import sitemap


class RuleList(ListView):
"""
Expand Down
2 changes: 1 addition & 1 deletion robots/wagtail_hooks.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register
from wagtail_modeladmin.options import ModelAdmin, modeladmin_register

from robots.models import Rule

Expand Down
20 changes: 11 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
],
},
install_requires=[
'wagtail>=2.15',
'wagtail>=5.2',
'wagtail-modeladmin>=2.1',
'six>=1.17.0',
],
classifiers=[
'Development Status :: 3 - Alpha',
Expand All @@ -33,16 +35,16 @@
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development',
'Topic :: Software Development :: Libraries :: Application Frameworks',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Framework :: Django',
'Framework :: Django :: 3.2',
'Framework :: Django :: 4.0',
'Framework :: Django :: 4.1',
'Framework :: Wagtail :: 2',
'Framework :: Wagtail :: 3',
'Framework :: Wagtail :: 4',
'Framework :: Django :: 4.2',
'Framework :: Django :: 5.0',
'Framework :: Django :: 5.1',
'Framework :: Wagtail :: 5',
'Framework :: Wagtail :: 6',
]
)
8 changes: 5 additions & 3 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
flake8>=3.0.4
sphinx!=1.6.1,>=1.5.1
sphinx-rtd-theme>=0.2.4
flake8>=5.0.4
sphinx>=7.1.2
sphinx-rtd-theme>=2.0.0
doc8
setuptools==70.0.0
six>=1.17.0
2 changes: 1 addition & 1 deletion testmanage.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def runtests():
try:
execute_from_command_line(argv)
finally:
from wagtail.tests.settings import STATIC_ROOT, MEDIA_ROOT
from wagtail.test.settings import STATIC_ROOT, MEDIA_ROOT

shutil.rmtree(STATIC_ROOT, ignore_errors=True)
shutil.rmtree(MEDIA_ROOT, ignore_errors=True)
Expand Down
16 changes: 12 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,20 @@ skipsdist = True
usedevelop = True

envlist =
py{37}-dj{32}-wt{215,216}
py{38,39,310}-dj{32,40}-wt{216,30,40}
py{39,310}-dj{41}-wt{40,41}
python{3.9,3.10,3.11}-django4.2-wagtail{5.2,6.3,6.4}
python{3.10,3.11,3.12}-django5.0-wagtail{5.2,6.3,6.4}
python{3.12,3.13}-django5.1-wagtail{6.3,6.4}

[gh-actions]
python =
3.9: py39
3.10: py310
3.11: py311
3.12: py312
3.13: py313

[testenv]
deps = -r{toxinidir}/test-requirements.txt
deps = -r {toxinidir}/test-requirements.txt
setenv = VIRTUAL_ENV={envdir}
install_command = pip install -e ".[testing]" -U {opts} {packages}
commands =
Expand Down