Доп оформление запросов

This commit is contained in:
Anton Kamalov
2024-10-24 11:03:19 +03:00
parent bd45f9c068
commit f2730d85d4
2 changed files with 7 additions and 7 deletions

View File

@@ -6,7 +6,7 @@ from .requests_route import route
import json
with open(path.join(path.dirname(__file__), 'zapros_menu.json')) as f:
options = json.load(f)
requests_list = json.load(f)
sql_provider = SQLProvider(path.join(path.dirname(__file__), 'sql'))
requests_bp = Blueprint('requests_bp', __name__, template_folder='templates')
@@ -15,7 +15,7 @@ requests_bp = Blueprint('requests_bp', __name__, template_folder='templates')
@check_auth
def requests():
if request.method == 'GET':
return render_template('zapros_menu.html', options=options)
return render_template('zapros_menu.html', options=requests_list)
else:
return 'error'
@@ -33,6 +33,6 @@ def sklad_zapros():
zagotovki = route(session['db_config'], material, sql_provider, 'zapros1.sql')
if zagotovki.status:
categories = ['Материал', 'Вес', 'Цена', 'Количество']
return render_template('output.html', items=zagotovki.result, categories = categories)
return render_template('output.html', items=zagotovki.result, titles = categories, object='Заготовки на складе')
else:
return zagotovki.error_message