1👍
✅
This:
I can’t use db.key() function in the html file
is not true. You can use any functions or methods that don’t take arguments in a template. So, as thebjorn pointed out in the comment, this would work fine:
img_id="{{ message.key }}"
because the template language would call the key()
method and then convert it to string for output.
Source:stackexchange.com