Initial for Waybill blueprint

This commit is contained in:
2024-11-05 15:50:54 +03:00
parent b9a07fe533
commit d5f2322559
3 changed files with 21 additions and 0 deletions

9
App/Waybill/__init__.py Normal file
View File

@@ -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')

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Авторизация</title>
<link href="/static/css/auth.css" type="text/css" rel="stylesheet">
<link href="/static/css/main.css" type="text/css" rel="stylesheet">
</head>
<body>
<h1>Заглушка для примера составления накладной</h1>

View File

@@ -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():