Initial for Waybill blueprint
This commit is contained in:
9
App/Waybill/__init__.py
Normal file
9
App/Waybill/__init__.py
Normal 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')
|
||||||
10
App/Waybill/templates/waybill.html
Normal file
10
App/Waybill/templates/waybill.html
Normal 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>
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
from flask import Flask, render_template, session
|
from flask import Flask, render_template, session
|
||||||
from Requests import requests_bp
|
from Requests import requests_bp
|
||||||
|
from Waybill import waybill_bp
|
||||||
from Auth import auth_bp
|
from Auth import auth_bp
|
||||||
import os, json
|
import os, json
|
||||||
|
|
||||||
@@ -13,6 +14,7 @@ app.config.update(
|
|||||||
|
|
||||||
app.register_blueprint(requests_bp, url_prefix='/requests')
|
app.register_blueprint(requests_bp, url_prefix='/requests')
|
||||||
app.register_blueprint(auth_bp, url_prefix='/auth')
|
app.register_blueprint(auth_bp, url_prefix='/auth')
|
||||||
|
app.register_blueprint(waybill_bp, url_prefix='/waybill')
|
||||||
|
|
||||||
@app.route('/')
|
@app.route('/')
|
||||||
def index():
|
def index():
|
||||||
|
|||||||
Reference in New Issue
Block a user