Основа для оформления накладных

This commit is contained in:
2024-12-01 17:57:16 +03:00
parent d708baf2dd
commit 988d8fe006
10 changed files with 128 additions and 80 deletions

View File

@@ -1,11 +1,16 @@
from flask import request, Blueprint, render_template, session, current_app, redirect, url_for
from checker import check_auth
from .model import waybill_model
waybill_bp = Blueprint('waybill_bp', __name__, template_folder='templates')
@waybill_bp.route('/', methods=['GET', 'POST'])
@check_auth
def waybill():
if request.method == 'GET':
return render_template('waybill.html')
pack = waybill_model()
if pack.status:
return render_template('waybill.html', items=pack.result)
else:
return render_template('error.html', error_message=pack.error_message)
print(request.form)
return 'OK'