From e8da9790dc6d55cd2e8883322cdf9a7bf5b4f5b7 Mon Sep 17 00:00:00 2001 From: Joris Date: Mon, 20 May 2024 20:09:01 +0200 Subject: Migrate to sanic --- src/templates.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/templates.py') diff --git a/src/templates.py b/src/templates.py index c605e57..8125f69 100644 --- a/src/templates.py +++ b/src/templates.py @@ -8,15 +8,15 @@ page: str = ''' Files - - + +

Files

''' -index: str = f''' +pub index: str = f''' {page}
@@ -79,8 +79,14 @@ index: str = f'''
''' -def download(href: str, filename: str, expires: str) -> str: +def file_page(file_id: str, filename: str, expires: str) -> str: + href = f'{file_id}/download' expires_in = datetime.datetime.strptime(expires, '%Y-%m-%d %H:%M:%S') - datetime.datetime.now() + + print() + print(href) + print() + return f''' {page} -- cgit v1.2.3