Conditions | 1 |
Total Lines | 13 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | 1 | from flask import Blueprint, render_template, current_app, make_response |
|
16 | @blueprint.route("/custom") |
||
17 | @flaskparser.use_kwargs(OPTIONS) |
||
18 | def get(font, image): |
||
19 | html = render_template( |
||
20 | 'custom.html', |
||
21 | fonts=sorted(current_app.font_service.all()), |
||
22 | font=font, |
||
23 | image=image, |
||
24 | config=current_app.config, |
||
25 | ) |
||
26 | response = make_response(html) |
||
27 | response.headers['Cache-Control'] = f'max-age={60*60*24*7}' |
||
28 | return response |
||
29 |