You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/04/03 15:20:49 UTC

[GitHub] [incubator-superset] craig-rueda commented on a change in pull request #9376: Add CUSTOM_TEMPLATE_PROCESSOR config

craig-rueda commented on a change in pull request #9376: Add CUSTOM_TEMPLATE_PROCESSOR config
URL: https://github.com/apache/incubator-superset/pull/9376#discussion_r403081268
 
 

 ##########
 File path: superset/config.py
 ##########
 @@ -585,6 +588,13 @@ class CeleryConfig:  # pylint: disable=too-few-public-methods
 # dictionary.
 JINJA_CONTEXT_ADDONS: Dict[str, Callable] = {}
 
+# A dictionary of macro template processors that gets merged into global
+# template processors. The existing template processors get updated with this
+# dictionary, which means the existing keys get overwritten by the content of this
+# dictionary. The customized addons don't necessarily need to use jinjia templating
+# language. This allows you to define custom logic to process macro template.
+CUSTOM_TEMPLATE_PROCESSOR = {}  # type: Dict[str, BaseTemplateProcessor]
 
 Review comment:
   Nit: naming here -- `CUSTOM_TEMPLATE_PROCESSOR` should be something like `CUSTOM_TEMPLATE_PROCESSOR_MAP` or even just `CUSTOM_TEMPLATE_PROCESSORS`, as there can potentially be several processors configured via this config property.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org