Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: wagtail-nest/wagtail-bakery
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.7.0
Choose a base ref
...
head repository: wagtail-nest/wagtail-bakery
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 14 commits
  • 16 files changed
  • 4 contributors

Commits on May 8, 2023

  1. Copy the full SHA
    37ea0dd View commit details
  2. Copy the full SHA
    83fb02a View commit details
  3. Copy the full SHA
    0bfff2a View commit details
  4. Copy the full SHA
    1383135 View commit details

Commits on May 15, 2023

  1. Copy the full SHA
    a2b8d5b View commit details

Commits on May 22, 2023

  1. Update Wagtail documentation links (#91)

    - Fix 404 internationalisation docs link
    - Use `wagtail.org` domain
    - Always refer to the latest version of Wagtail in documentation
      links
    Stormheg authored May 22, 2023
    Copy the full SHA
    903c449 View commit details
  2. Change author email address to [email protected] (#90)

    The old `.io` domain is not current anymore.
    
    See wagtail/wagtail#7841
    Stormheg authored May 22, 2023
    Copy the full SHA
    3214cc3 View commit details

Commits on Nov 5, 2023

  1. Copy the full SHA
    eaa5dcb View commit details
  2. Add Wagtail 5.1 and 5.2 + Python 3.12 support (#93)

    * Add STATIC_URl to test settings
    
    On Wagtail 5.1 and later, this raises ImproperlyConfigured: You're using the staticfiles app without having set the required STATIC_URL setting
    
    * Remove Wagtail 4.2 from matrix
    
    No longer supported since this August.
    
    * Add Wagtail 5.1 and 5.2 LTS to matrix
    
    * Add Python 3.12 support
    
    * Don't mark wheel as python2 compatible
    
    * Ensure setuptools in installed in CI
    Stormheg authored Nov 5, 2023
    Copy the full SHA
    bb04de0 View commit details

Commits on Jan 1, 2024

  1. Copy the full SHA
    4fe1b7b View commit details

Commits on May 3, 2024

  1. Update django-bakery doc link in README.md (#94)

    Update the link to the `django-bakery` documentation to point to the project's new documentation locations.
    wsot authored May 3, 2024
    Copy the full SHA
    75cb1be View commit details

Commits on May 15, 2024

  1. Update Django / Wagtail support matrix (#95)

    Drop unsupported versions and add what's fresh.
    Stormheg authored May 15, 2024
    Copy the full SHA
    c24b317 View commit details
  2. Update preliminary changelog

    [skip ci]
    Stormheg committed May 15, 2024
    Copy the full SHA
    affcbf2 View commit details

Commits on Jan 2, 2025

  1. Use CircleCI Python 3.13 image for nightly tests (#99)

    gasman authored Jan 2, 2025
    Copy the full SHA
    a491649 View commit details
5 changes: 2 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
jobs:
nightly-wagtail-test:
docker:
- image: circleci/python:3.8
- image: cimg/python:3.13
steps:
- checkout
- run: git clone git@github.com:wagtail/wagtail.git

# Install your plugin with its testing requirements.
- run: pip install -e .[test]
# Replace Wagtail with the one checked out from git.
# Also pin Django to 3.x until django-bakery adds Django 4 support
- run: pip install ./wagtail "Django<4"
- run: pip install ./wagtail
# Run the tests.
- run: pytest

48 changes: 48 additions & 0 deletions .github/workflows/publish-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Publish to TestPyPI
on:
push:
tags:
# Only run for tags ending with `.devN`
# https://peps.python.org/pep-0440/#summary-of-permitted-suffixes-and-relative-ordering
- '*\.dev\d+'
jobs:
test:
uses: ./.github/workflows/test.yml

build:
needs: ['test']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v3
with:
python-version: 3.11

- run: |
pip install setuptools
python setup.py sdist
- uses: actions/upload-artifact@v3
with:
path: ./dist

# https://docs.pypi.org/trusted-publishers/using-a-publisher/
test-pypi-publish:
needs: ['build']
environment: 'publish-test'

name: upload release to TestPyPI
runs-on: ubuntu-latest
permissions:
# Mandatory for trusted publishing
id-token: write
steps:
- uses: actions/download-artifact@v3

- name: Publish package distributions to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: artifact/
print-hash: true
repository-url: https://test.pypi.org/legacy/
48 changes: 48 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Publish to PyPI
on:
push:
tags:
# Only run for tags **not** ending with `.devN`
# https://peps.python.org/pep-0440/#summary-of-permitted-suffixes-and-relative-ordering
- '*'
- '!*\.dev\d+'
jobs:
test:
uses: ./.github/workflows/test.yml

build:
needs: ['test']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v3
with:
python-version: 3.11

- run: |
pip install setuptools
python setup.py sdist
- uses: actions/upload-artifact@v3
with:
path: ./dist

# https://docs.pypi.org/trusted-publishers/using-a-publisher/
pypi-publish:
needs: ['build']
environment: 'publish'

name: upload release to PyPI
runs-on: ubuntu-latest
permissions:
# Mandatory for trusted publishing
id-token: write
steps:
- uses: actions/download-artifact@v3

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: artifact/
print-hash: true
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Wagtail Bakery CI
name: Test & Lint

on:
push:
branches:
- main

pull_request:
workflow_call: # Allow for the publish workflows to run the tests by calling this workflow

jobs:
test:
@@ -14,7 +14,7 @@ jobs:
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
python: ["3.8", "3.9", "3.10", "3.11"]
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
experimental: [false]
toxenv: ["py"]
include:
@@ -26,7 +26,7 @@ jobs:
toxenv: isort
experimental: false
# Future Wagtail release from main branch (allowed to fail)
- python: "3.11"
- python: "3.12"
toxenv: wagtailmain
experimental: true
steps:
@@ -37,7 +37,7 @@ jobs:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install tox tox-py
python -m pip install setuptools tox tox-py
# This step runs only for jobs NOT in the include matrix
- name: Run tox targets for Python ${{ matrix.python }}
24 changes: 22 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -5,9 +5,29 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased](https://github.com/wagtail-nest/wagtail-bakery/compare/0.7.0...HEAD)
## [Unreleased](https://github.com/wagtail-nest/wagtail-bakery/compare/0.8.0...HEAD)

Nothing yet
### Added

- Compatibility with Wagtail 6.0 and 6.1. [#95](https://github.com/wagtail-nest/wagtail-bakery/pull/95)
- Compatibility with Django 5.0. [#95](https://github.com/wagtail-nest/wagtail-bakery/pull/95)

### Fixed

- Fix links to Wagtail documentation. [#91](https://github.com/wagtail-nest/wagtail-bakery/pull/91)
- Fix link to django-bakery documentation. [#94](https://github.com/wagtail-nest/wagtail-bakery/pull/94)

### Removed

- Drop support for Wagtail before 5.2. [#95](https://github.com/wagtail-nest/wagtail-bakery/pull/95)
- Drop support for Django before 4.2. [#95](https://github.com/wagtail-nest/wagtail-bakery/pull/95)

## [0.8.0](https://github.com/wagtail-nest/wagtail-bakery/compare/0.7.0...0.8.0)

### Added

- Compatibility with Wagtail 5.0 and Django 4.2. [#86](https://github.com/wagtail-nest/wagtail-bakery/pull/86)
- (Development) Update factory-boy to 3.x [#87](https://github.com/wagtail-nest/wagtail-bakery/pull/87)

## [0.7.0](https://github.com/wagtail-nest/wagtail-bakery/compare/0.6.0...0.7.0)

20 changes: 1 addition & 19 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: help all clean install flake8 isort lint test build publish publish-test
.PHONY: help all clean install flake8 isort lint test
.DEFAULT_GOAL := help

help: ## See what commands are available.
@@ -24,21 +24,3 @@ lint: flake8 isort ## Lint the project.

test: ## Test the project.
py.test

build: ## Build the package.
@echo '== Cleanup =='
rm dist/* 2>/dev/null || true
@echo '== Build project =='
python setup.py sdist

publish: build ## Publishes a new version to PyPI.
@echo '== Publish project to PyPi =='
twine upload dist/*
@echo '== Success =='
@echo 'Go to https://pypi.org/project/wagtail-bakery/ and check that all is well.'

publish-test: build ## Publishes a new version to TestPyPI.
@echo '== Publish project to PyPi [TEST] =='
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
@echo '== Success =='
@echo 'Go to https://test.pypi.org/project/wagtail-bakery/ and check that all is well.'
42 changes: 27 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -4,37 +4,44 @@ A set of helpers for baking your Django Wagtail site out as flat files.

[![License: MIT](https://img.shields.io/pypi/l/wagtail-bakery)](https://github.com/wagtail-nest/wagtail-bakery/blob/main/LICENSE)
[![Build Status](https://github.com/wagtail-nest/wagtail-bakery/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/wagtail-nest/wagtail-bakery/actions/workflows/test.yml)
[![Coverage Status](https://coveralls.io/repos/github/wagtail-nest/wagtail-bakery/badge.svg?branch=main)](https://coveralls.io/github/wagtail-nest/wagtail-bakery?branch=main)
[![Version](https://img.shields.io/pypi/v/wagtail-bakery.svg)](https://pypi.python.org/pypi/wagtail-bakery/)
[![Monthly downloads](https://img.shields.io/pypi/dm/wagtail-bakery.svg?logo=Downloads)](https://pypi.python.org/pypi/wagtail-bakery/)

Wagtail-bakery is built on top of [Django bakery](https://github.com/datadesk/django-bakery). Please read their [documentation](https://django-bakery.readthedocs.io/en/latest/) for detailed configuration and how to build default Django flat files. Yes. Wagtail-bakery is not limited to build Wagtail pages specifically, mixed content is possible!
Wagtail-bakery is built on top of [Django bakery](https://github.com/datadesk/django-bakery). Please read their [documentation](https://palewi.re/docs/django-bakery/) for detailed configuration and how to build default Django flat files. Yes. Wagtail-bakery is not limited to build Wagtail pages specifically, mixed content is possible!

## Links

- [Issues](https://github.com/wagtail-nest/wagtail-bakery/issues)
- [Discussion boards](https://github.com/wagtail/wagtail/discussions) are open for sharing ideas and plans for the Wagtail project.
- [Changelog](https://github.com/wagtail-nest/wagtail-bakery/issues)
- [Coverage](https://coveralls.io/github/wagtail-nest/wagtail-bakery)

### Security

We take the security of Wagtail, and related packages we maintain, seriously. If you have found a security issue with any of our projects please email us at [security@wagtail.org](mailto:security@wagtail.org) so we can work together to find and patch the issue. We appreciate responsible disclosure with any security related issues, so please contact us first before creating a GitHub issue.

If you want to send an encrypted email (optional), the public key ID for security@wagtail.org is 0xbed227b4daf93ff9, and this public key is available from most commonly-used keyservers.

## Features

- Single management command that will build your Wagtail site out as flat files
- Support for multisite, [theming](https://github.com/wagtail/wagtail-themes) and [multilingual](http://docs.wagtail.io/en/latest/advanced_topics/i18n/index.html) setup
- Support for multisite, [theming](https://github.com/wagtail/wagtail-themes) and [multilingual](https://docs.wagtail.org/en/latest/advanced_topics/i18n.html) setup
- Support for `i18n_patterns`
- Support for generating a static API
- Ready to use Wagtail Buildable views to build all your (un)published pages at once (no extra code required!)

## Supported Versions

- Python 3.8 - 3.11
- Django 3.2 - 4.1
- Wagtail >= 4.1
- Python 3.8 - 3.12
- Django 4.2 - 5.0
- Wagtail >= 5.2

We aim to support the Wagtail versions as [supported](http://docs.wagtail.io/en/latest/releases/upgrading.html) by Wagtail (current LTS, current stable).
We aim to support the Wagtail versions as [supported](http://docs.wagtail.org/en/latest/releases/upgrading.html) by Wagtail (current LTS, current stable).

Django/Wagtail combinations as [supported](http://docs.wagtail.io/en/latest/releases/upgrading.html#compatible-django-python-versions) by Wagtail (for the Wagtail versions as defined above).
Django/Wagtail combinations as [supported](http://docs.wagtail.org/en/latest/releases/upgrading.html#compatible-django-python-versions) by Wagtail (for the Wagtail versions as defined above).

### Browser support

We align our browser support targets with that of Wagtail. Have a look at the [official documentation](http://docs.wagtail.io/en/latest/contributing/developing.html).
We align our browser support targets with that of Wagtail. Have a look at the [official documentation](http://docs.wagtail.org/en/latest/contributing/developing.html).

## Installation

@@ -94,7 +101,7 @@ BAKERY_VIEWS = (
)
```

The API views use Wagtail's V2 API module. To configure the data that is rendered by these views, please refer to Wagtail's [V2 API configuration guide](http://docs.wagtail.io/en/stable/advanced_topics/api/v2/configuration.html).
The API views use Wagtail's V2 API module. To configure the data that is rendered by these views, please refer to Wagtail's [V2 API configuration guide](http://docs.wagtail.org/en/latest/advanced_topics/api/v2/configuration.html).

## Usage

@@ -155,14 +162,19 @@ Test as follow:

### Releases

1. Ensure you have the latest versions of `pip`, `setuptools` and `twine` installed in your virtual environment.
1. Create a new branch (e.g. `release/1.1.3`) for the release of the new version.
1. Update the version number in `setup.py` following [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
1. Update `CHANGELOG.md`.
1. On GitHub, create a pull request and squash merge it.
1. Checkout and pull the `main` branch locally.
1. (Optional) If you need to verify anything, use `make publish-test` to upload to https://test.pypi.org and enter your PyPi _test_ credentials as needed.
1. Use `make publish` and enter your PyPi credentials as needed.
1. On GitHub, if this is a minor release bump (for example `1.1.0` or `1.2.0` but not `1.1.1`, `1.2.3`), create a `stable/1.1.x` branch from `main`.
1. (Optional) Publish to TestPyPI if you need to verify anything:
1. Create and push a tag following the pattern `X.Y.Z.devN` (for example `1.1.3.dev1`).
1. Follow the action progress for the [Publish to TestPyPI](https://github.com/wagtail-nest/wagtail-bakery/actions/workflows/publish-test.yml) workflow.
1. Check the result on [TestPyPI: wagtail-bakery](https://test.pypi.org/project/wagtail-bakery/).
1. Publish to PyPI:
1. Create and push a tag following [PEP 440 – Version Identification Specification](https://peps.python.org/pep-0440/) (for example `1.1.3` or `1.1.3rc1`), except for the `.devN` suffix used for testing (see _Publish to TestPyPI_ step above)
1. Follow the action progress for the [Publish to PyPI](https://github.com/wagtail-nest/wagtail-bakery/actions/workflows/publish.yml) workflow
1. Check the result on [PyPI: wagtail-bakery](https://pypi.org/project/wagtail-bakery/)
1. On GitHub, create a release and a tag for the new version.

## Credits
2 changes: 1 addition & 1 deletion examples/aws/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
django
django-environ
wagtail>=4.2
wagtail>=5.2
git+https://github.com/wagtail-nest/wagtail-bakery.git#egg=wagtail-bakery
2 changes: 1 addition & 1 deletion examples/multisite/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
django
wagtail>=4.2
wagtail>=5.2
git+https://github.com/wagtail-nest/wagtail-bakery.git#egg=wagtail-bakery
2 changes: 1 addition & 1 deletion examples/site/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
django
wagtail>=4.2
wagtail>=5.2
git+https://github.com/wagtail/wagtail-bakery.git#egg=wagtail-bakery
3 changes: 0 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -30,6 +30,3 @@ known_third_party=bakery,django,factory,pytest,wagtail

[tool:pytest]
testpaths=tests

[wheel]
universal=1
10 changes: 6 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
]

test_requires = [
'factory-boy<3',
'factory-boy',
'flake8',
'isort',
'pytest',
@@ -19,12 +19,12 @@

setup(
name='wagtail-bakery',
version='0.7.0',
version='0.8.0',
description='A set of helpers for baking your Django Wagtail site out as flat files.',
long_description=long_description,
long_description_content_type='text/markdown',
author='Rob Moorman and Wagtail Core Team',
author_email='hello@wagtail.io',
author_email='hello@wagtail.org',
url="https://github.com/wagtail-nest/wagtail-bakery/",
project_urls={
"Source": "https://github.com/wagtail-nest/wagtail-bakery/",
@@ -44,12 +44,14 @@
'License :: OSI Approved :: MIT License',
'Framework :: Django',
'Framework :: Wagtail',
'Framework :: Wagtail :: 4',
'Framework :: Wagtail :: 5',
'Framework :: Wagtail :: 6',
'Operating System :: Unix',
'Programming Language :: Python :: 3',
'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',
],
)
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -90,4 +90,5 @@ def pytest_configure():
'wagtailbakery.views.AllPagesView',
),
CELERY_ALWAYS_EAGER=True,
STATIC_URL="/static/",
)
2 changes: 1 addition & 1 deletion tests/factories/page.py
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
from wagtail.models import Page


class PageFactory(factory.DjangoModelFactory):
class PageFactory(factory.django.DjangoModelFactory):
depth = 2
numchild = 0
path = '00010002'
2 changes: 1 addition & 1 deletion tests/factories/site.py
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
from wagtail.models import Site


class SiteFactory(factory.DjangoModelFactory):
class SiteFactory(factory.django.DjangoModelFactory):
hostname = 'localhost'
port = 80
is_default_site = True
Loading