This commit is contained in:
2026-05-06 22:14:38 +03:30
parent 8feb949d7d
commit cf7cbb937c
12 changed files with 298 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
def render(obj, context):
if isinstance(obj, dict):
return {k: render(v, context) for k, v in obj.items()}
if isinstance(obj, list):
return [render(i, context) for i in obj]
if isinstance(obj, str):
return obj.format(**context)
return obj