neon-jungle / wagtail-schema.org

Schema.org JSON-LD tags for Wagtail sites
BSD 2-Clause "Simplified" License
70 stars 17 forks source link

Change base model to BaseSiteSetting for Wagtail 4 #14

Closed dkirkham closed 1 year ago

dkirkham commented 1 year ago

Fixes #13

Wagtail 4.0 has deprecated wagtail.contrib.settings.models.BaseSetting in favour of wagtail.contrib.settings.models.BaseSiteSetting. This PR introduces into wagtail-schema.org a conditional import to maintain compatibility from Wagtail 2 into Wagtail 4.

Tested with local tests (runtests.py) and in one of my Wagtail projects with both Wagtail 3.x, Wagtail 4.0 and Wagtail 4.0.2.

It would be good to get this PR merged in readiness for the release of Wagtail 4.1 LTS in November 2022.