v0.21.0 release notes¶
New features¶
Upgraded to Wagtail 2.13
Added new
<head>and<body>tracking script settings. See Add Tracking Scripts.Added new
coderedcms.fields.MonospaceFieldfor rendering text area fields in the Wagtail admin with monospace input and spell-checking disabled. This is used by the new tracking settings and is useful for implementing code-oriented fields.Improve developer tooling in new CodeRed CMS sites by providing pre-configured
.gitattributeand.editorconfigfiles.SEO features have been refactored into separate package
wagtail-seo. There should be no noticeable changes to your models, except for the addition of new properties which can be easily overridden and customized. See wagtail-seo customization docs.
Upgrade considerations¶
Existing projects will need to add
wagtailseo,toINSTALLED_APPS(usually insettings/base.py).AMP support has been removed. This means that your site will no longer serve automatically generated AMP pages after upgrading. If you had previously implemented custom AMP templates, or rely heavily on AMP pages, you may need to implement this functionality yourself. For any site what is not a large news publisher, we recommend removing AMP from your site, as it is no longer worth the maintenance burden. See reasoning for this change.
coderedcms_tags.convert_to_amphas been removed.coderedcms.utils.convert_to_amp()has been removed.You should remove any
amp_templateattributes from your models, as they are no longer used.
coderedcms/pages/base.htmltemplate has been modified. If you implement or extend your ownbase.html, the following changes are notable:template blocks:
html_seo_base,html_seo_extra,og_seo_base,og_seo_extra,twitter_seo_base,twitter_seo_extrahave been replaced with{% include "wagtailseo/meta.html" %}template blocks:
struct_seo_base,struct_seo_extrahave been replaced with{% include "wagtailseo/struct_data.html" %}
Properties and templates associated with SEO functionality have changed:
CoderedArticlePage.get_author_name->CoderedArticlePage.seo_authorCoderedArticlePage.get_pub_date->CoderedArticlePage.seo_published_atCoderedArticlePage.get_description->CoderedArticlePage.seo_descriptioncoderedcms_tags.og_image->page.seo_image_urlcoderedcms_tags.structured_data_datetimehas been removed.
Some built-in blocks used in the Wagtail admin have been replaced:
coderedcms.blocks.MultiSelectBlock->wagtail.core.blocks.MultipleChoiceBlockcoderedcms.blocks.OpenHoursValue->wagtailseo.blocks.OpenHoursValuecoderedcms.blocks.OpenHoursBlock->wagtailseo.blocks.OpenHoursBlockcoderedcms.blocks.StructuredDataActionBlock->wagtailseo.blocks.StructuredDataActionBlock
CodeRed CMS now sets
default_auto_field = 'django.db.models.AutoField'for its own concrete models. If you had previously manually specified a differentDEFAULT_AUTO_FIELDDjango setting, you may need to create a migration.You may need to find/replace
coderedcms.blocks.base_blocks.MultiSelectBlockwithwagtail.core.blocks.MultipleChoiceBlockin any old migrations so that they may continue working.Follow Wagtail 2.12 upgrade considerations and Wagtail 2.13 upgrade considerations.
You may need to run
python manage.py makemigrations websiteandpython manage.py migrateafter upgrading.
Supported software¶
Python 3.6, 3.7, 3.8, 3.9
Django 2.2, 3.0, 3.1, 3.2
Thank you!¶
Thanks to everyone who contributed to 0.21.0 on GitHub.