Custom J2 Ext to Wrap Templates with their Filename
Add comments or annotations to template files (.html.j2
, .css.j2
, .js.j2
) before rendering them in a Jinja environment, providing clarity about the start and end of each template block. Example usage;
if os.getenv("LOCAL_MODE") == "yes" and os.getenv("TEST_MODE") != "yes":
from x.wrap_templates_extension import WrapTemplatesWithNames
app_jinja_env.add_extension(WrapTemplatesWithNames)
Function Profiler
The profileme
decorator in Python facilitates function execution profiling, directing the results to a file named after the function being profiled. It offers options to specify the directory and sorting method for the profile statistics.
TODO Highlight Extension Colours
todohighlight.json --> Extension (Marketplace), Reference Colours