Flask-Static-Digest 用于处理静态文件
文档:https://github.com/nickjj/flask-static-digest
安装pip install Flask-Static-Digest
使用示例
# -*- coding: utf-8 -*-
from flask import Flask, render_template
from flask_static_digest import FlaskStaticDigest
app = Flask(__name__)
# 注册
FlaskStaticDigest(app)
# 路由
@app.route('/')
def hello_world():
return render_template('index.html')
if __name__ == '__main__':
app.run(debug=True)
index.html
关注
打赏
热门博文
- Python:ULID通用唯一词典排序标识符
- Module not found: Error: Can‘t resolve ‘path‘
- 利用workflows工作流Actions自动部署Vue项目Deploy to GitHub Pages
- Vue2.js:前端在浏览器中网页表格打印的实现方案:window.print、print-js、iframe
- MacOS:使用内置的屏幕截图和屏幕录像功能
- css: Tailwind CSS一个功能类优先的 CSS 框架
- css:border-radius绘制边框圆角-全圆和椭圆
- PHP/Python/js:时间转为人类可读的字符串格式:刚刚、几分钟前、几小时前、几天前
- Golang:imaging一个简单、实用的图像处理工具
- element-plus:Dialog 对话框在有滚动条的页面会抖动