diff --git a/app.py b/app.py index b0f2066..ce3f4e4 100644 --- a/app.py +++ b/app.py @@ -50,10 +50,10 @@ def create(): def view_list(): if request.method == 'POST': outfile = open('inventory_export.csv', 'w', newline='') - outcsv = csv.writer(outfile) + outcsv = csv.writer(outfile, delimiter='|') records = db.session.query(Asset).all() - outcsv.writerow([column.hostname for column in Asset.__mapper__.columns]) - [outcsv.writerow([getattr(curr, column.hostname) for column in Asset.__mapper__.columns]) for curr in records] + outcsv.writerow([column.name for column in Asset.__mapper__.columns]) + [outcsv.writerow([getattr(curr, column.name) for column in Asset.__mapper__.columns]) for curr in records] outfile.close() return send_file('inventory_export.csv', as_attachment=True) diff --git a/templates/delete.html b/templates/delete.html index ecedf45..9b618aa 100644 --- a/templates/delete.html +++ b/templates/delete.html @@ -7,13 +7,13 @@
Add | - View + View
Do you want to delete the item? - Cancel + Cancel
diff --git a/templates/viewList.html b/templates/viewList.html index 869951c..6f11dc2 100644 --- a/templates/viewList.html +++ b/templates/viewList.html @@ -32,7 +32,7 @@ {{item.warrantyfrom}} - ${{item.status}} + {{item.status}} {{item.staffnum}}