main.py: add global for jinja template and ordered dict