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

Support wagtail42 #246

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a022308
Silence warnings about DEFAULT_AUTO_FIELD
nickmoreton Nov 18, 2022
16d57c5
Wagtail 2.15 change
nickmoreton Nov 18, 2022
0d1a26d
Testing for Wagtail 3.0.3 and django 3.2.16
nickmoreton Nov 18, 2022
0a03af0
Run updatemodulepaths on src folder
nickmoreton Nov 18, 2022
432483d
Run updatemodulepaths on sandbox
nickmoreton Nov 18, 2022
5791313
wagtail 3 change models
nickmoreton Nov 18, 2022
5642e11
Wagtail 4 changes
nickmoreton Nov 18, 2022
e31793e
Fix tests
nickmoreton Nov 18, 2022
18f6b7c
Allow wagtail 4.1
nickmoreton Nov 18, 2022
5c4e263
Update tox and CI testing
nickmoreton Nov 18, 2022
de42f81
Django 4+ changes
nickmoreton Nov 18, 2022
9c11a0b
Lint after updating black
nickmoreton Nov 18, 2022
d51c109
Alter commands to they will run as expected.
nickmoreton Jul 27, 2023
da0164b
Ignore a virtualenv
nickmoreton Jul 27, 2023
c74c097
Update sandbox dependencies to be inline with setup.py
nickmoreton Jul 27, 2023
47db648
Revert the change to wagtailfontawesome
nickmoreton Jul 27, 2023
40d441f
Black shouldn't try to format migrations
nickmoreton Jul 27, 2023
2ade95e
Some test here are not applicable.
nickmoreton Jul 27, 2023
fac8a42
Correct required wagtail and django versions
nickmoreton Jul 27, 2023
ad62ba5
Update dependencies and add support for Wagtail 4.2
nickmoreton Feb 13, 2023
7967d37
Run black on migrations
nickmoreton Feb 13, 2023
438fbb9
Update sandbox dependencies
nickmoreton Feb 14, 2023
3ed761d
Remove support for wagtail < 4.1 in sandbox
nickmoreton Feb 14, 2023
c48d94a
Remove support for Wagtail < 4.1 in package
nickmoreton Feb 14, 2023
859b236
Fix some older wagtail version deprecation warnings
nickmoreton Feb 14, 2023
ea9b85a
Update wagtail factories to 4.0.0
nickmoreton Feb 14, 2023
957e17a
revert the wagtail-font-awesome-svg dependency to wagtailfontawesome
nickmoreton Mar 6, 2023
2cb8145
Avoids the Configure the DEFAULT_AUTO_FIELD setting warning
nickmoreton Mar 7, 2023
a45a9f0
Update docs
nickmoreton Mar 7, 2023
c7f799e
Linting
nickmoreton Mar 8, 2023
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
63 changes: 9 additions & 54 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,67 +20,22 @@ jobs:
test:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
max-parallel: 5
matrix:
tox_env:
- py36-dj22-wt211
- py36-dj22-wt212
- py36-dj22-wt213
- py37-dj22-wt211
- py37-dj22-wt212
- py37-dj22-wt213
- py38-dj22-wt211
- py38-dj22-wt212
- py38-dj22-wt213
- py37-dj30-wt211
- py37-dj30-wt212
- py37-dj30-wt213
- py38-dj30-wt211
- py38-dj30-wt212
- py38-dj30-wt213
include:
- python-version: 3.6
tox_env: py36-dj22-wt211
- python-version: 3.6
tox_env: py36-dj22-wt212
- python-version: 3.6
tox_env: py36-dj22-wt213
- python-version: 3.7
tox_env: py37-dj22-wt211
- python-version: 3.7
tox_env: py37-dj22-wt212
- python-version: 3.7
tox_env: py37-dj22-wt213
- python-version: 3.8
tox_env: py38-dj22-wt211
- python-version: 3.8
tox_env: py38-dj22-wt212
- python-version: 3.8
tox_env: py38-dj22-wt213
- python-version: 3.7
tox_env: py37-dj30-wt211
- python-version: 3.7
tox_env: py37-dj30-wt212
- python-version: 3.7
tox_env: py37-dj30-wt213
- python-version: 3.8
tox_env: py38-dj30-wt211
- python-version: 3.8
tox_env: py38-dj30-wt212
- python-version: 3.8
tox_env: py38-dj30-wt213
python: ["3.7", "3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
python -m pip install tox tox-gh-actions
- name: Test with tox
run: tox -e ${{ matrix.tox_env }} --index-url=https://pypi.python.org/simple/
run: tox
- name: Prepare artifacts
run: mkdir -p .coverage-data && mv .coverage.* .coverage-data/
- uses: actions/upload-artifact@master
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ node_modules
.DS_Store

.pytest_cache/

venv/
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ install: develop
develop: clean requirements

test:
py.test --nomigrations --reuse-db tests/
py.test --reuse-db tests/

retest:
py.test --nomigrations --reuse-db tests/ -vvv
py.test --reuse-db tests/ -vvv

coverage:
py.test --nomigrations --reuse-db tests/ --cov=wagtail_personalisation --cov-report=term-missing --cov-report=html
py.test --reuse-db tests/ --cov=wagtail_personalisation --cov-report=term-missing --cov-report=html

docs:
$(MAKE) -C docs html
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ in the admin interface.

Instructions
------------
Wagtail Personalisation requires Wagtail 2.0 or 2.1 and Django 1.11 or 2.0.
Wagtail Personalisation requires Wagtail 4.1+ and Django 3.2+

To install the package with pip:

Expand Down
66 changes: 40 additions & 26 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@
import os
import sys

on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
on_rtd = os.environ.get("READTHEDOCS", None) == "True"

if not on_rtd: # only import and set the theme if we're building docs locally
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'

html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath("."))

# -- General configuration ------------------------------------------------

Expand All @@ -41,31 +42,31 @@
extensions = []

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
source_suffix = ".rst"

# The master toctree document.
master_doc = 'index'
master_doc = "index"

# General information about the project.
project = 'wagtail-personalisation'
copyright = '2019, Lab Digital BV'
author = 'Lab Digital BV'
project = "wagtail-personalisation"
copyright = "2019, Lab Digital BV"
author = "Lab Digital BV"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.15.3'
version = "0.15.3"

# The full version, including alpha/beta/rc tags.
release = '0.15.3'
release = "0.15.3"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand All @@ -77,10 +78,10 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
Expand All @@ -99,10 +100,10 @@
#
# html_theme_options = {}
html_theme_options = {
'analytics_id': 'UA-100203499-2',
"analytics_id": "UA-100203499-2",
}

html_logo = 'logo.png'
html_logo = "logo.png"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand All @@ -113,7 +114,7 @@
# -- Options for HTMLHelp output ------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'wagtail-personalisationdoc'
htmlhelp_basename = "wagtail-personalisationdoc"


# -- Options for LaTeX output ---------------------------------------------
Expand All @@ -122,15 +123,12 @@
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
Expand All @@ -140,8 +138,13 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'wagtail-personalisation.tex', 'wagtail-personalisation Documentation',
'Lab Digital BV', 'manual'),
(
master_doc,
"wagtail-personalisation.tex",
"wagtail-personalisation Documentation",
"Lab Digital BV",
"manual",
),
]


Expand All @@ -150,8 +153,13 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'wagtail-personalisation', 'wagtail-personalisation Documentation',
[author], 1)
(
master_doc,
"wagtail-personalisation",
"wagtail-personalisation Documentation",
[author],
1,
)
]


Expand All @@ -161,7 +169,13 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'wagtail-personalisation', 'wagtail-personalisation Documentation',
author, 'wagtail-personalisation', 'One line description of project.',
'Miscellaneous'),
(
master_doc,
"wagtail-personalisation",
"wagtail-personalisation Documentation",
author,
"wagtail-personalisation",
"One line description of project.",
"Miscellaneous",
),
]
2 changes: 1 addition & 1 deletion docs/getting_started/installation.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Installing Wagxperience
=======================

Wagtail Personalisation requires Wagtail_ 2.0 or 2.1 and Django_ 1.11 or 2.0.
Wagtail Personalisation requires Wagtail_ 4.1+ and Django_ 3.2+

.. _Wagtail: https://github.com/wagtail/wagtail
.. _Django: https://github.com/django/django
Expand Down
2 changes: 1 addition & 1 deletion docs/usage_guide/implementation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ A very simple example for a personalisable homepage:

.. code-block:: python

from wagtail.wagtailcore.models import Page
from wagtail.models import Page
from wagtail_personalisation.models import PersonalisablePageMixin

class HomePage(PersonalisablePageMixin, Page):
Expand Down
6 changes: 3 additions & 3 deletions sandbox/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Django>=2.2,<2.3
wagtail>=2.6,<2.7
django-debug-toolbar==2.0
Django>=3.2,<4.2
wagtail>=4.1,<4.3
django-debug-toolbar
-e .[docs,test]
1 change: 0 additions & 1 deletion sandbox/sandbox/apps/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@

25 changes: 17 additions & 8 deletions sandbox/sandbox/apps/home/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,38 @@
# Generated by Django 1.11.1 on 2017-05-31 16:59
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion
import modelcluster.fields
from django.db import migrations, models


class Migration(migrations.Migration):

initial = True

dependencies = [
('wagtailcore', '0033_remove_golive_expiry_help_text'),
('wagtail_personalisation', '0011_personalisablepagemetadata'),
("wagtailcore", "0033_remove_golive_expiry_help_text"),
("wagtail_personalisation", "0011_personalisablepagemetadata"),
]

operations = [
migrations.CreateModel(
name='HomePage',
name="HomePage",
fields=[
('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
(
"page_ptr",
models.OneToOneField(
auto_created=True,
on_delete=django.db.models.deletion.CASCADE,
parent_link=True,
primary_key=True,
serialize=False,
to="wagtailcore.Page",
),
),
],
options={
'abstract': False,
"abstract": False,
},
bases=('wagtailcore.page', models.Model),
bases=("wagtailcore.page", models.Model),
),
]
Loading