From 25942a4467d887b0513e87ca0c4280d0914fe71a Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Mon, 20 Jan 2020 14:26:06 +0000 Subject: [PATCH] Rename WAGTAIL_ENABLE_RESPONSIVE_EMBED to WAGTAILEMBEDS_RESPONSIVE_HTML for consistency with other settings --- CHANGELOG.txt | 2 +- docs/releases/2.8.rst | 2 +- docs/topics/writing_templates.rst | 2 +- wagtail/embeds/models.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 304bbe59bf..4d993d8928 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -23,7 +23,7 @@ Changelog * Add partial experimental support for nested InlinePanels (Matt Westcott, Sam Costigan, Andy Chosak, Scott Cranfill) * Added cache control headers when serving documents (Johannes Vogel) * Use `sensitive_post_parameters` on password reset form (Dan Braghis) - * Add ``WAGTAIL_ENABLE_RESPONSIVE_EMBED`` setting to remove automatic addition of ``responsive-object`` around embeds (Kalob Taulien) + * Add `WAGTAILEMBEDS_RESPONSIVE_HTML` setting to remove automatic addition of `responsive-object` around embeds (Kalob Taulien) * Fix: Rename documents listing column 'uploaded' to 'created' (LB (Ben Johnston)) * Fix: Unbundle the l18n library as it was bundled to avoid installation errors which have been resolved (Matt Westcott) * Fix: Prevent error when comparing pages that reference a model with a custom primary key (Fidel Ramos) diff --git a/docs/releases/2.8.rst b/docs/releases/2.8.rst index ad625e51e4..e2099ebc14 100644 --- a/docs/releases/2.8.rst +++ b/docs/releases/2.8.rst @@ -43,7 +43,7 @@ Other features * Add partial experimental support for nested InlinePanels (Matt Westcott, Sam Costigan, Andy Chosak, Scott Cranfill) * Added cache control headers when serving documents (Johannes Vogel) * Use ``sensitive_post_parameters`` on password reset form (Dan Braghis) - * Add ``WAGTAIL_ENABLE_RESPONSIVE_EMBED`` setting to remove automatic addition of ``responsive-object`` around embeds (Kalob Taulien) + * Add ``WAGTAILEMBEDS_RESPONSIVE_HTML`` setting to remove automatic addition of ``responsive-object`` around embeds (Kalob Taulien) Bug fixes diff --git a/docs/topics/writing_templates.rst b/docs/topics/writing_templates.rst index 7b911bd618..dbd13b04f1 100644 --- a/docs/topics/writing_templates.rst +++ b/docs/topics/writing_templates.rst @@ -145,7 +145,7 @@ Wagtail includes embeds and images at their full width, which may overflow the b height: 100%; } -It's possible to disable responsive embeds entirely by setting ``WAGTAIL_ENABLE_RESPONSIVE_EMBED = False`` in your settings. Normally, Wagtail wraps your embed links in a ``
`` element. If you decide to disable responsive embeds the ``
`` element around your embed will not be given a CSS class of ``responsive-object`` and there won't be an inline style in the same parent ``
`` element. This means the responsiveness of your embed is entirely up to you. +It's possible to disable responsive embeds entirely by setting ``WAGTAILEMBEDS_RESPONSIVE_HTML = False`` in your settings. Normally, Wagtail wraps your embed links in a ``
`` element. If you decide to disable responsive embeds the ``
`` element around your embed will not be given a CSS class of ``responsive-object`` and there won't be an inline style in the same parent ``
`` element. This means the responsiveness of your embed is entirely up to you. Internal links (tag) ~~~~~~~~~~~~~~~~~~~~ diff --git a/wagtail/embeds/models.py b/wagtail/embeds/models.py index e1a061bf84..ce5a263867 100644 --- a/wagtail/embeds/models.py +++ b/wagtail/embeds/models.py @@ -51,7 +51,7 @@ class Embed(models.Model): @property def is_responsive(self): - if not getattr(settings, 'WAGTAIL_ENABLE_RESPONSIVE_EMBED', True): + if not getattr(settings, 'WAGTAILEMBEDS_RESPONSIVE_HTML', True): return False return self.ratio is not None