I know it’s a simple question, but I have strange behaviour in here.
<pre>
%for key in tags_photo:
% try:
{{ key }} : {{ exif[tags_photo[key]].raw_value }}
% except KeyError:
% continue
%end
</pre>
I assume that only content in pre tag should be repeated like in jinja2..?
But now I got a loop of the whole template..(i mean pre tags repeated also) why??
how to do properly loops in bottlepy template?
You need to close all of your blocks:
(In the code you posted in the OP, the one
%endwas only closing thetry/exceptblock, so theforblock was extending to the end of the template.)