Fix scanned walletindex pages

This commit is contained in:
Philip Sargent
2022-03-18 12:26:32 +00:00
parent af7fc8f243
commit 8b889ade5f
5 changed files with 50 additions and 2 deletions

View File

@@ -32,6 +32,18 @@ def oldwallet(request, path):
message = f'Scan folder error or not found \'{path}\' .'
return render(request, 'errors/generic.html', {'message': message})
def walletindex(request, path):
'''All years: special 'wallet' for scanned index pages
'''
# print([ s.walletname for s in Wallet.objects.all() ])
print(f'! - walletindex path:{path}')
try:
wallet = Wallet.objects.get(walletname=urlunquote(path))
return render(request, 'walletindex.html', { 'wallet':wallet, 'settings': settings })
except:
message = f'Scan folder error or not found \'{path}\' .'
return render(request, 'errors/generic.html', {'message': message})
def scansingle(request, path, file):
'''sends a single binary file to the user for display - browser decides how using mimetype
'''