Conditions | 1 |
Total Lines | 11 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | from flask import Blueprint, render_template, current_app, make_response |
||
9 | @blueprint.route("/examples") |
||
10 | def get(): |
||
11 | sample_images = list(samples()) |
||
12 | html = render_template( |
||
13 | "examples.html", |
||
14 | sample_images=sample_images, |
||
15 | config=current_app.config, |
||
16 | ) |
||
17 | response = make_response(html) |
||
18 | response.headers['Cache-Control'] = f'max-age={60*60*24*7}' |
||
19 | return response |
||
20 |