added docker and chnages of from model changes commits
This commit is contained in:
14
main.py
14
main.py
@@ -4,7 +4,7 @@ from dotenv import load_dotenv
|
||||
load_dotenv()
|
||||
import pandas as pd
|
||||
from werkzeug.utils import secure_filename
|
||||
|
||||
from datetime import date
|
||||
from AppCode.Config import DBConfig
|
||||
from AppCode.LoginAuth import LoginAuth
|
||||
from AppCode.FileHandler import FileHandler
|
||||
@@ -107,10 +107,16 @@ def add_itr():
|
||||
itr = ITRHandler()
|
||||
itr.add_itr(request.form)
|
||||
itr.close()
|
||||
flash("ITR record added successfully!", "success")
|
||||
|
||||
if 'documents' in request.files:
|
||||
doc = DocumentHandler()
|
||||
doc.Upload(request)
|
||||
|
||||
# flash("ITR record added successfully!", "success")
|
||||
flash("ITR record and documents uploaded successfully!", "success")
|
||||
return redirect(url_for('display_itr'))
|
||||
|
||||
return render_template('add_itr.html')
|
||||
return render_template('add_itr.html',current_date=date.today().isoformat())
|
||||
|
||||
## 4. DELETE an ITR record
|
||||
@app.route('/itr/delete/<int:id>', methods=['POST'])
|
||||
@@ -135,7 +141,7 @@ def update_itr(id):
|
||||
|
||||
record = itr.get_itr_by_id(id)
|
||||
itr.close()
|
||||
return render_template('update_itr.html', record=record)
|
||||
return render_template('update_itr.html', record=record, current_date=date.today().isoformat())
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user