python - How would you turn jinja2 templates into static html -
i have flask application using jinja2 template engine. content dynamic, pulling particular bits database.
i'd turn particular page static dynamic data etc. intact. however, i'd run every hour or database continue have new data, hench why i'm not using existing static generator or building static page manually - cron job run automatically.
any thoughts on how might done? can't provide code examples don't have clue on how might tackle this.
any me started appreciated.
you can use frozen-flask convert dynamic flask app static site. can discover pages on it's own, assuming each page linked page, such list of blog posts linking individual posts. there ways tell other pages if not discovered automatically. run periodically cron job update static site regularly.
freeze_app.py
:
from flask_frozen import freezer myapp import app freezer = freezer(app) freezer.freeze()
Comments
Post a Comment