From d5f232255917c88dbc030b070b40ac4fd0da8185 Mon Sep 17 00:00:00 2001 From: Anton Kamalov Date: Tue, 5 Nov 2024 15:50:54 +0300 Subject: [PATCH] Initial for Waybill blueprint --- App/Waybill/__init__.py | 9 +++++++++ App/Waybill/templates/waybill.html | 10 ++++++++++ App/app.py | 2 ++ 3 files changed, 21 insertions(+) create mode 100644 App/Waybill/__init__.py create mode 100644 App/Waybill/templates/waybill.html diff --git a/App/Waybill/__init__.py b/App/Waybill/__init__.py new file mode 100644 index 0000000..c91ca76 --- /dev/null +++ b/App/Waybill/__init__.py @@ -0,0 +1,9 @@ +from flask import request, Blueprint, render_template, session, current_app, redirect, url_for +from checker import check_auth +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') \ No newline at end of file diff --git a/App/Waybill/templates/waybill.html b/App/Waybill/templates/waybill.html new file mode 100644 index 0000000..f81ea5c --- /dev/null +++ b/App/Waybill/templates/waybill.html @@ -0,0 +1,10 @@ + + + + + Авторизация + + + + +

Заглушка для примера составления накладной

\ No newline at end of file diff --git a/App/app.py b/App/app.py index 2941e4a..38f6a5c 100644 --- a/App/app.py +++ b/App/app.py @@ -1,5 +1,6 @@ from flask import Flask, render_template, session from Requests import requests_bp +from Waybill import waybill_bp from Auth import auth_bp import os, json @@ -13,6 +14,7 @@ app.config.update( app.register_blueprint(requests_bp, url_prefix='/requests') app.register_blueprint(auth_bp, url_prefix='/auth') +app.register_blueprint(waybill_bp, url_prefix='/waybill') @app.route('/') def index():