#21 remove returnlist
All checks were successful
/ Plan (push) Successful in 42s

This commit is contained in:
Dan Hamik 2024-11-25 23:50:49 -06:00
parent 320cfdf266
commit c56a6526dc

View File

@ -188,8 +188,7 @@ TD {border-width: 1px; padding: 3px; border-style: solid; border-color: black;}
tableend="</table> </body></html>" tableend="</table> </body></html>"
timezone = ZoneInfo("America/Chicago") timezone = ZoneInfo("America/Chicago")
returntable="Last Updated" + str(datetime.datetime.now(timezone)) returntable="Last Updated" + str(datetime.datetime.now(timezone))
returntable+='<br>Click <a href="https://librarynotice.hamik.net">Here</a> to be able to refresh the list.' returntable+='<br>Click <a href="https://librarynotice.hamik.net">Here</a> to visit the site.'
returntable+='<br>Click for the <a href="https://librarynotice.hamik.net/returnlist.html">return list</a>'
returntable += """<form action="https://librarynotice.hamik.net/refresh.php"> returntable += """<form action="https://librarynotice.hamik.net/refresh.php">
<input type="submit" value="Refresh Items"> <input type="submit" value="Refresh Items">
</form> </form>
@ -277,8 +276,6 @@ else:
for item in returnlist: for item in returnlist:
returntable += "<TR><TD>" + item.person + td + item.materialtype + td + str(item.renewalcount) + td + str(item.checkoutdate) + td + str(item.duedate) + td + item.title + td + item.isbn + td +'<img src="'+ item.coverurl+'">' +"</td></tr>\n" returntable += "<TR><TD>" + item.person + td + item.materialtype + td + str(item.renewalcount) + td + str(item.checkoutdate) + td + str(item.duedate) + td + item.title + td + item.isbn + td +'<img src="'+ item.coverurl+'">' +"</td></tr>\n"
returntable += tableend returntable += tableend
with open("/var/www/html/returnlist.html","w",encoding='utf-8') as outhtml:
outhtml.write(returntable)
htmltable = returntable htmltable = returntable
with open("/var/www/html/index.html","w",encoding='utf-8') as outhtml: with open("/var/www/html/index.html","w",encoding='utf-8') as outhtml:
outhtml.write(htmltable) outhtml.write(htmltable)