From 320cfdf26643a83a82ad0b89b52800b0d6d908dd Mon Sep 17 00:00:00 2001 From: Dan Hamik Date: Mon, 25 Nov 2024 23:45:10 -0600 Subject: [PATCH] fixing tables --- libnotices.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libnotices.py b/libnotices.py index 20512c9..b2f09a8 100644 --- a/libnotices.py +++ b/libnotices.py @@ -228,6 +228,7 @@ else: returntable += tablestart + "Name"+th+"Type"+th+"Times Renewed"+th+"Checked Out"+th+"Due Date"+th+"Title" + th + "ISBN" + th + "Thumbnail" for item in returnlist: returntable += "" + item.person + td + item.materialtype + td + str(item.renewalcount) + td + str(item.checkoutdate) + td + str(item.duedate) + td + item.title + td + item.isbn + td +'' +"\n" + returntable += tableend returnlist = [d for d in allbooks if (d.renewalcount == 2)] if len(returnlist) == 0: pass @@ -243,6 +244,7 @@ else: returntable += tablestart + "Name"+th+"Type"+th+"Times Renewed"+th+"Checked Out"+th+"Due Date"+th+"Title" + th + "ISBN" + th + "Thumbnail" for item in returnlist: returntable += "" + item.person + td + item.materialtype + td + str(item.renewalcount) + td + str(item.checkoutdate) + td + str(item.duedate) + td + item.title + td + item.isbn + td +'' +"\n" + returntable += tableend returnlist = [d for d in allbooks if (d.renewalcount == 1)] if len(returnlist) == 0: pass @@ -258,6 +260,7 @@ else: returntable += tablestart + "Name"+th+"Type"+th+"Times Renewed"+th+"Checked Out"+th+"Due Date"+th+"Title" + th + "ISBN" + th + "Thumbnail" for item in returnlist: returntable += "" + item.person + td + item.materialtype + td + str(item.renewalcount) + td + str(item.checkoutdate) + td + str(item.duedate) + td + item.title + td + item.isbn + td +'' +"\n" + returntable += tableend returnlist = [d for d in allbooks if (d.renewalcount == 0)] if len(returnlist) == 0: pass @@ -273,6 +276,7 @@ else: returntable += tablestart + "Name"+th+"Type"+th+"Times Renewed"+th+"Checked Out"+th+"Due Date"+th+"Title" + th + "ISBN" + th + "Thumbnail" for item in returnlist: returntable += "" + item.person + td + item.materialtype + td + str(item.renewalcount) + td + str(item.checkoutdate) + td + str(item.duedate) + td + item.title + td + item.isbn + td +'' +"\n" + returntable += tableend with open("/var/www/html/returnlist.html","w",encoding='utf-8') as outhtml: outhtml.write(returntable) htmltable = returntable