Add support for constants #11567
GuillermoNasarre
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Context
In my organization, we share a common package with reusable and standardized logic.
In this package, we centralize variables like:
tracking_start_datedesktop_idSince these variables should never change, we came up with this approach:
constantsmacro in the package:{% macro constants() -%} {%- set constants = namespace() -%} {%- set constants.TRACKING_START_DATE = "date(2025, 1, 1)" -%} {%- set constants.DEVICE_IDS = namespace( DESKTOP=1234, MOBILE=4321 ) -%} {%- do return(constants) -%} {%- endmacro %}constantsmacro from the project:Idea
What do you think of adding support for constants?
Beta Was this translation helpful? Give feedback.
All reactions