Основа для оформления накладных
This commit is contained in:
@@ -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'
|
||||
Reference in New Issue
Block a user