20 lines
448 B
Python
20 lines
448 B
Python
from email.policy import default
|
|
from jinja2 import TemplateNotFound
|
|
|
|
from flask import Blueprint, render_template, jsonify, abort
|
|
|
|
webui = Blueprint('webui', __name__, url_prefix='/telezab')
|
|
|
|
|
|
@webui.route('/', defaults={'index'})
|
|
def index():
|
|
try:
|
|
return render_template(index.html)
|
|
except TemplateNotFound:
|
|
abort(404)
|
|
|
|
|
|
@webui.route('/data')
|
|
def get_data():
|
|
return jsonify({"message": "Данные из frontend!"})
|