SpecialistOff.NET / Вопросы / Статьи / Фрагменты кода / Резюме / Метки / Помощь / Файлы
Список вопросов ПечатьМетки: flask jinja python mime ipxe fedora kickstart
| RemiZOffAlex Создано: 2020-04-09 15:17:58.449117 Обновлено: 2022-12-28 13:58:03.089459 |
|---|
#!/usr/bin/env python3
from flask import Flask, render_template, Response
app = Flask(__name__)
@app.route('/')
def ipxe():
body = render_template("fedora.37.ipxe")
return Response(body, mimetype='text/plain')
@app.route('/ks')
def kickstart():
body = render_template("anaconda-ks.cfg")
return Response(body, mimetype='text/plain')
|