forked from expo/troggle
remove redundant code
This commit is contained in:
parent
182df351b9
commit
beecb4b0ac
@ -199,16 +199,16 @@ 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(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 (wallet) 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(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 (wallet) 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
|
||||
|
@ -1,31 +0,0 @@
|
||||
<!-- walletindex.html - this text visible because this template has been included -->
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Wallet Scanned Index Pages{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
<h3>Wallet Index Scanned Pages: {{wallet.walletname|slice:'0:4'}}</h3>
|
||||
|
||||
<table>
|
||||
{% for singlescan in wallet.singlescan_set.all %}
|
||||
<tr>
|
||||
<td class="singlescan"><a href="{{singlescan.get_absolute_url}}">{{singlescan.name}}</a></td>
|
||||
<td>
|
||||
{% for survexblock in singlescan.survexblock_set.all %}
|
||||
{{survexblock}}
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
<p><em>
|
||||
<a href="/wallets/year/{{wallet.walletname|slice:'0:4'}}">Wallet index for this year</a> {{wallet.walletname|slice:'0:4'}}
|
||||
<br />
|
||||
<a href="/expedition/{{wallet.walletname|slice:'0:4'}}">Expedition page for this year </a> {{wallet.walletname|slice:'0:4'}}
|
||||
<br />
|
||||
<a href="/scanupload/{{wallet.walletname|slice:'0:4'}}:01">First wallet for this year </a> {{wallet.walletname|slice:'0:4'}}
|
||||
<br />
|
||||
<a href="/scanupload/{{wallet.walletname|slice:'0:4'}}:00">Lost+Found wallet for this year </a> {{wallet.walletname|slice:'0:4'}}
|
||||
</em>
|
||||
|
||||
{% endblock %}
|
Loading…
Reference in New Issue
Block a user