2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-21 23:01:52 +00:00

menu change to go to latest blank wallet

This commit is contained in:
Philip Sargent 2023-01-31 20:52:22 +00:00
parent 3c7661836c
commit e38d29f33d
2 changed files with 1 additions and 4 deletions

View File

@ -274,7 +274,6 @@ def walletedit(request, path=None):
def get_next_empty():
latest = Wallet.objects.filter(walletname__startswith="20").latest('walletname')
print(f"Latest {latest=}")
next = int(latest.walletname[5:]) + 1
return f"{latest.walletname[:4]}:{next:02d}"
@ -293,7 +292,6 @@ def walletedit(request, path=None):
return (oldwallet(request, path), None)
except:
# if nonumeric wpath name for example
raise
return (oldwallet(request, path), None)
if not re.match("(19|20)\d\d[:#]\d\d\d?", wpath):
@ -443,7 +441,6 @@ def walletedit(request, path=None):
redirect, wallet = preprocess_path(path)
if redirect:
return redirect
print(f"{wallet=}")
next, nexty, prev, prevy, year = create_nav_links(wallet)
wurl = f"/walletedit/{wallet}".replace("#", ":")

View File

@ -32,7 +32,7 @@
<a href="/survexfile/">Survex</a> |
<a href="{% url "survexcaveslist" %}">All Survex</a> |
<a href="{% url "allscans" %}">Scans</a> |
<a href="{% url "walletedit" '2022:01' %}">Upload Scans</a> |
<a href="{% url "walletedit" '0000:01' %}">Upload Scans</a> |
<a href="{% url "dwgallfiles" %}">Drawings</a> |
<a href="{% url "dwgupload" %}">Upload Drawings</a> |
<a href="{% url "photoupload" %}">Upload Photos</a> |