diff --git a/CHANGELOG.md b/CHANGELOG.md index 51226322..bed32c7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Pre-release +### Implemented enhancements + +- XOT-1285 madb content markdown field + ## [2020.01.29](https://github.com/uktrade/directory-cms/releases/tag/2020.01.29) [Full Changelog](https://github.com/uktrade/directory-cms/compare/2020.01.20...2020.01.29) diff --git a/export_readiness/models.py b/export_readiness/models.py index a1c515b4..13ac2da9 100644 --- a/export_readiness/models.py +++ b/export_readiness/models.py @@ -1402,7 +1402,7 @@ class HomePage( verbose_name='Image' ) madb_image_alt = models.TextField(null=True, blank=True, verbose_name='Image alt text') - madb_content = models.TextField(null=True, blank=True, verbose_name='Content') + madb_content = MarkdownField(null=True, blank=True, verbose_name='Content') madb_cta_text = models.CharField(null=True, blank=True, max_length=255, verbose_name='CTA text') madb_cta_url = models.CharField(null=True, blank=True, max_length=255, verbose_name='CTA URL') diff --git a/export_readiness/serializers.py b/export_readiness/serializers.py index 5a192c88..860d1454 100644 --- a/export_readiness/serializers.py +++ b/export_readiness/serializers.py @@ -482,7 +482,7 @@ class HomePageSerializer(BasePageSerializer): madb_title = serializers.CharField(required=False) madb_image = wagtail_fields.ImageRenditionField('original', required=False) madb_image_alt = serializers.CharField(required=False) - madb_content = serializers.CharField(required=False) + madb_content = core_fields.MarkdownToHTMLField(required=False) madb_cta_text = serializers.CharField(required=False) madb_cta_url = serializers.CharField(required=False)