Skip to content

Instantly share code, notes, and snippets.

@peteristhegreat
peteristhegreat / jinja_asset.py
Last active October 14, 2020 18:37 — forked from dlrust/jinja_asset.py
Jinja2 extension to append modified timestamp for cachebreaking for flask!
import os
#from django.conf import settings
from flask import current_app as app
from jinja2 import nodes # it is here, don't believe pycharm
from jinja2.exceptions import TemplateSyntaxError
from jinja2.ext import Extension
class AssetExtension(Extension):