Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!
Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.
Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!
[Solved] Jinja2 - How to comment lines
(@hans)
Famed Member Admin
Joined: 13 years ago
Posts: 3147
Topic starter
August 7, 2026 2:33 AM
[#1577]
Playing in the templates editor (Settings -> Tools/Developer -> Templates) I usually add comments so I know what the code is doing.
In Jinja2 this is quite easy:
# This is a comment
This approach however works for only one line.
Sometimes I want to comment out quite a few lines - especially when I want to comment out a piece of code.
To comment multiple lines we need to use this:
{# start line comment
....
#}