Compare commits
2 Commits
0a60a16344
...
08393f6685
| Author | SHA1 | Date | |
|---|---|---|---|
| 08393f6685 | |||
| 9cde4e2c7d |
34
app.py
34
app.py
@@ -7,6 +7,9 @@ from datetime import *
|
||||
import csv
|
||||
import random
|
||||
from urllib.parse import unquote
|
||||
from flask_httpauth import HTTPBasicAuth
|
||||
from werkzeug.security import generate_password_hash, check_password_hash
|
||||
from openpyxl import load_workbook
|
||||
|
||||
|
||||
app = Flask(__name__)
|
||||
@@ -22,6 +25,13 @@ db.init_app(app)
|
||||
migrate = Migrate(app, db)
|
||||
|
||||
|
||||
|
||||
@app.route("/login", methods=['GET', 'POST'])
|
||||
def login():
|
||||
return render_template('login.html')
|
||||
|
||||
|
||||
|
||||
@app.route("/", methods=['GET', 'POST'])
|
||||
def index():
|
||||
results = []
|
||||
@@ -298,10 +308,32 @@ def createdb():
|
||||
|
||||
db.session.commit()
|
||||
|
||||
def write2excell():
|
||||
wb = load_workbook("VedomostMOL.xlsx")
|
||||
sheet = wb.worksheets[0]
|
||||
|
||||
x=19314
|
||||
|
||||
with app.app_context():
|
||||
joinQuery = db.session.query(Oboruds, Auditory).filter(
|
||||
Oboruds.aud_id == Auditory.id).filter(
|
||||
Oboruds.invNumber==x)
|
||||
|
||||
print(joinQuery.all())
|
||||
|
||||
|
||||
|
||||
for i in range(10):
|
||||
cell = 'B'+str(i+6)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
#write2excell()
|
||||
#ranomraspr()
|
||||
#createdb()
|
||||
app.run(debug=True, host='0.0.0.0', port='3800')
|
||||
|
||||
Reference in New Issue
Block a user