From 1c71a27225f1c3f4968aa724398a51cef1216caf Mon Sep 17 00:00:00 2001 From: Franco Pellegrini Date: Fri, 15 Apr 2022 18:17:35 -0300 Subject: [PATCH] Do not apply the theme transform over every request. Closes gh-207 --- news/207.misc | 2 ++ src/plone/app/theming/transform.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 news/207.misc diff --git a/news/207.misc b/news/207.misc new file mode 100644 index 00000000..7ad97f65 --- /dev/null +++ b/news/207.misc @@ -0,0 +1,2 @@ +Do not apply the theme transform over every request +[frapell] diff --git a/src/plone/app/theming/transform.py b/src/plone/app/theming/transform.py index 9a09dd42..13b5b1b9 100644 --- a/src/plone/app/theming/transform.py +++ b/src/plone/app/theming/transform.py @@ -14,6 +14,7 @@ from zope.component import adapter from zope.interface import implementer from zope.interface import Interface +from zope.location.interfaces import ILocation import logging @@ -25,7 +26,7 @@ @implementer(ITransform) -@adapter(Interface, IThemingLayer) +@adapter(ILocation, IThemingLayer) class ThemeTransform(object): """Late stage in the 8000's transform chain. When plone.app.blocks is used, we can benefit from lxml parsing having taken place already.