19 lines
500 B
Python
19 lines
500 B
Python
"""Главная страница — blueprint."""
|
|
|
|
from flask import Blueprint, current_app, render_template
|
|
|
|
from app.api.http_client import HttpClient
|
|
from app.operations.get_instances import get_organization
|
|
|
|
bp = Blueprint("main", __name__)
|
|
|
|
|
|
@bp.route("/")
|
|
def index():
|
|
client = HttpClient(
|
|
current_app.config["NUBES_API_ENDPOINT"],
|
|
current_app.config["NUBES_API_TOKEN"],
|
|
)
|
|
org = get_organization(client)
|
|
return render_template("index.html", organization=org)
|